From 90d467ab06e742cb151f8c7e76e1bf3aef8794d1 Mon Sep 17 00:00:00 2001 From: Yan Pritzker Date: Mon, 8 Oct 2012 21:45:40 -0700 Subject: [PATCH] Added ,,F to do same as ,,f in a vertical split --- README.md | 3 ++- vim/plugin/settings/smart_jump_to_tag.vim | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 07a2563..d2a763c 100644 --- a/README.md +++ b/README.md @@ -241,8 +241,9 @@ If you omit the key combo, you'll get a list of all the maps. You can do the sam #### Search/Code Navigation * `,f` - instantly Find definition of class (must have exuberant ctags installed) + * `,F` - same as `,f` but in a vertical split * `,,f` - jump to Method. Same as vim's built in jump to tag, but much more aware of ruby bang_methods! and method.invocations! - * `,F` - same as ,f but in a vertical split + * `,,F` - same as `,,f` but in a vertical split * `,gf` or `Ctrl-f` - same as vim normal gf (go to file), but in a vertical split (works with file.rb:123 line numbers also) * `gF` - standard vim mapping, here for completeness (go to file at line number) * `K` - GitGrep the current word under the cursor and show results in quickfix window diff --git a/vim/plugin/settings/smart_jump_to_tag.vim b/vim/plugin/settings/smart_jump_to_tag.vim index 24cadb6..0749cbf 100644 --- a/vim/plugin/settings/smart_jump_to_tag.vim +++ b/vim/plugin/settings/smart_jump_to_tag.vim @@ -36,8 +36,11 @@ endfunction " 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) -