Skip to content

Instantly share code, notes, and snippets.

@rramsden
Created June 7, 2011 23:35
Show Gist options
  • Save rramsden/1013450 to your computer and use it in GitHub Desktop.
Save rramsden/1013450 to your computer and use it in GitHub Desktop.
Generates ctags for your RVM gemset and current directory
" You will need the latest version of Exuberant CTAGS @ http://ctags.sourceforge.net/
" F8 - Generate ctags for your current directory and current RVM gemset
let g:ctagdirs = "!/usr/local/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q . ".$HOME."/.rvm/gems/".system("rvm current | tr -d '\n'")."/gems"
map <F8> :exe g:ctagdirs<CR>
" You can use Ctrl-] to jump to a function.... Ctrl-p will jump back
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
map <C-p> :pop<CR>
" You can cycle through multiple function definitions using
" these mappings. This maps to my windows key + left/right arrows
map <M-right> :tnext<CR>
map <M-left> :tprev<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment