From 2696f6670ac8302ecd92ef393b0a84f21a468ab6 Mon Sep 17 00:00:00 2001 From: Yan Pritzker Date: Wed, 27 Feb 2013 08:43:56 -0600 Subject: [PATCH] Removed unused / not working ,,f ,,F aliases --- vim/plugin/settings/smart_jump_to_tag.vim | 40 ----------------------- 1 file changed, 40 deletions(-) diff --git a/vim/plugin/settings/smart_jump_to_tag.vim b/vim/plugin/settings/smart_jump_to_tag.vim index 0749cbf..e0609c9 100644 --- a/vim/plugin/settings/smart_jump_to_tag.vim +++ b/vim/plugin/settings/smart_jump_to_tag.vim @@ -1,46 +1,6 @@ -function! JumpToRubyMethod() - " Grab the current WORD. Which could be something like - " object.some_method! - let l:stuff_under_cursor = expand("") - - " Figure out if this is a method call (obj.some_method) - " by looking for the period - let l:method_invocation = split(matchstr(l:stuff_under_cursor, '\..*'), '\.') - - " If there was no method invocation in the current word then - " we want to avoid the which might be something - " like foo_bar(baz). We just want the method name, which - " is already stored for us as by vim - if empty(l:method_invocation) - " See if this is a regular method ending in ! - let l:bang_method = matchstr(l:stuff_under_cursor, '.*!') - - if(empty(l:bang_method)) - let l:method_name = expand("") - else - let l:method_name = l:bang_method - end - else - " If there is a method invocation, then figure out - " the method name, which is the first element in the match - let l:method_name = l:method_invocation[0] - endif - - try - execute ':tag ' . l:method_name - catch - endtry -endfunction - " hit ,f to find the definition of the current class " this uses ctags. the standard way to get this is Ctrl-] nnoremap ,f -" Jump to tag with awareness of ruby bang! methods -nnoremap ,,f :call JumpToRubyMethod() - -" Jump to tag with awareness of ruby bang! methods (in vertical split) -nnoremap ,,F :vsp :wincmd w :call JumpToRubyMethod() - " use ,F to jump to tag in a vertical split nnoremap ,F :let word=expand(""):vsp:wincmd w:exec("tag ". word)