Automatically updating the tags

You probably don't want to have to manually run the ctags -R . command every time you make changes to the code. The simplest way to address this is to add the following to your .vimrc file:

" Regenerate tags when saving Python files.
autocmd BufWritePost *.py silent! !ctags -R &

The preceding snippet runs ctags -R every time you save a Python file.

You can replace the preceding *.py extension with different file extensions depending on the language you'd like to work with. For example, the following will generate a tags file for C++ files:

autocmd BufWritePost *.cpp *.h silent! !ctags -R & 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.90.141