Installing CTags (Exuberant)
Lets first install ctags-exuberant using Homebrew
1brew install ctags-exuberant
Remember the path that ctags got installed to, with version 5.8 on my machine it was in:
Setting up Vim/MacVim
Download the TagList plugin from VimOnline.
In your .vimrc file add the following:
1let Tlist_Ctags_Cmd='/usr/local/Cellar/ctags/5.8/bin/ctags' 2 3let g:Tlist_Ctags_Cmd='/usr/local/Cellar/ctags/5.8/bin/ctags' 4 5fu! CTagGen() 6 :execute "!" . g:Tlist_Ctags_Cmd . " -R ." 7endfunction 8 9nmap <silent> :ctg :call CTagGen()
Open up vim/MacVim, and type
You can then go to a controller for example:
And the follow should appear.
Lets say I’ve got my cursor on StoryType and I want to go to the model, I can just hit Ctrl+] to get there. You can now do this for any method (helpers, methods, anything thats in your ctags file!).