Using ctags in Vim
Using ctags and Vim is a lethal combination, especially when doing bigger projects.
Using them gives you the following features:
Getting started with TaglistTag list opens a left window where you can browse the current file. It gives a nice overview. Here is an example (click for a bigger picture): First download ctags. On Debian/Ubuntu it would be: sudo apt-get install exuberant-ctags After this, install the taglist.vim plugin, you can get it here. Now you need to configure taglist.vim, this can be done like this: let Tlist_Ctags_Cmd = "/usr/bin/ctags" let Tlist_WinWidth = 50 map <F4> :TlistToggle<cr> Pressing F4 will toggle the taglist window on and off. Try it out, it's really useful :) For more options look in taglist.txt documentation, it comes when downloading taglist.vim. Search and destroy using tagsI have one mapping in vimrc: map <F8> :!/usr/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR> This builds tags libs for the current working directory (it's super fast). Once you have build tags, you can browse them using builtin functions. Here are some examples:
If you want full power out of this I recommend reading following documentation:
Happy vim hacking.
Code
·
Tips
·
VIM Editor
•
15. Jul 2008
|
|