I have the following code in my .vimrc:
map <Leader>rt :!ctags --extra=+f -R *<CR><CR>
This generates ctags for my current directory.
I'm using RVM, I'm working on different projects, with different ruby versions (trough RVM gemsets.
I have a different $GEM_PATH per project, and I want to generate the ctags for the gems in this path too.
How should the above line be to test if the $GEM_PATH variable is set, and processing these paths too?
Or better still how to check if I have an .rvmrc file, and generate ctags depending of the contents of this file?
I use bundler to manage gems, so I use
ctags -R `bundle show rails`/../*
to get the tags for gems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With