Last active
May 25, 2020 00:25
-
-
Save Flolagale/5195934 to your computer and use it in GitHub Desktop.
Generate ctags incrementally in vim.
Juste paste this into your .vimrc.
I think the magic you use is just the --append
option.
You can just use the find
command to find all the file modified after the tag file like this:
find . -newer tags #tags is the name of you tag file
However, the option --append
does not work well when you delete some code from your source file. Even though a symbol is deleted from the source file, the --append
option could not let cags to delete the symbol from the tag file.
line 18:
Traceback (most recent call last):
File "", line 5, in no
OSError: [Errno 2] No such file or directory: 'tags'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just paste this into your .vimrc, it will provide you with a new command:
that will use ctags and update the tags only for the files that have a modification time more recent than the
tags
file modification time.This snippet uses vim's current working directory to find the files to index and requires Python, Exuberant Ctags and Vim compiled with Python support.