Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fntlnz/atags.vim
:collision: A plugin that simplifies tags generation on neovim
https://github.com/fntlnz/atags.vim
ctags neovim vim
Last synced: 24 days ago
JSON representation
:collision: A plugin that simplifies tags generation on neovim
- Host: GitHub
- URL: https://github.com/fntlnz/atags.vim
- Owner: fntlnz
- License: mit
- Created: 2015-08-23T16:34:11.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-14T22:18:56.000Z (over 7 years ago)
- Last Synced: 2024-04-17T08:10:17.851Z (7 months ago)
- Topics: ctags, neovim, vim
- Language: Vim script
- Homepage:
- Size: 9.77 KB
- Stars: 40
- Watchers: 3
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
atags.vim is a Neovim plugin that helps you creating and updating your tag files.
# Installation
Using [vim-plug](https://github.com/junegunn/vim-plug)
```viml
Plug 'fntlnz/atags.vim'
```# Customization
### Customize the generation command
The generation command is a list of commands that will be executed to generate your tags.
This is the default generation command:
```viml
let g:atags_build_commands_list = [
\"ctags -R -f tags.tmp",
\"awk 'length($0) < 400' tags.tmp > tags",
\"rm tags.tmp"
\]
```# Use cases
### Generate tags with `t`
```viml
map t :call atags#generate()
```### Generate tags everytime a file is being written.
```viml
autocmd BufWritePost * call atags#generate()
```### Generation examples
#### Generate tags using [stags](https://github.com/facebook/pfff) within a *Docker container*
```viml
let g:atags_build_commands_list = [
\"docker run --rm -v $PWD:/project -w /project fntlnz/pfff:latest stags -lang php -o tags -vim ."
\]
]
```#### Generate tags only for files that are not in `.gitignore`
```viml
let g:atags_build_commands_list = [
\ 'ag -g "" | ctags -L - --fields=+l -f tags.tmp',
\ 'awk "length($0) < 400" tags.tmp > tags',
\ 'rm tags.tmp'
\ ]
```#### Generate tags only for *PHP files* that are not in `.gitignore`
```viml
let g:atags_build_commands_list = [
\ 'ag --php -g "" | ctags -L - --fields=+l -f tags.tmp',
\ 'awk "length($0) < 400" tags.tmp > tags',
\ 'rm tags.tmp'
\ ]
```# Work in progress
- [x] ~~Support for different tag generators. At the moment this supports only ctags.~~
- [ ] Use [tpope/vim-dispatch](https://github.com/tpope/vim-dispatch) to be compatible with vim that doesn't have `jobstart`
- [x] Write the docs