You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vimchicago
I've been messing around with a way to quickly lookup source from vim. What I've got here is something that will pull the current word under the cursor when you hit <leader>v (my leader key is comma) and use the gem command to find the corresponding file in a gem. It then opens that file in a new tab. It falls down in a few places, but it's a good start.
function! OpenRubySource() let class_name = expand("<cword>") let ruby_file = system("gem which ".class_name) exec "tabe ".ruby_file endfunction
nmap <Leader>v :call OpenRubySource()<cr>
Is there already a plugin that does something like this? I did some searching before diving into this but I didn't find anything.
Ben
Jim Breen
unread,
Feb 23, 2010, 1:19:40 AM2/23/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vimch...@googlegroups.com
Ben,
Have you taken a look at ctags? It's a very mature tagging tool with a vim plugin. Here's a few links related to using it in vim with ruby (which I haven't personally done).