Implement jump to ruby method (bang-aware)

It always annoyed me that vim jump-to-tag (ctrl-] or ,f in yadr)
totally flopped when it came to ruby bang methods. This function
handles methods! and method.invocations! to find bang versions
of methods.
This commit is contained in:
Yan Pritzker
2012-10-08 18:39:08 -07:00
parent e1fe13d022
commit a5b5dd63e0
3 changed files with 47 additions and 7 deletions

View File

@@ -126,13 +126,6 @@ nnoremap ,gcp :GitGrepCurrentPartial<CR>
"GitGrep Current File
nnoremap ,gcf :call GitGrep(expand("%:t:r"))<CR>
" hit ,f to find the definition of the current class
" this uses ctags. the standard way to get this is Ctrl-]
nnoremap <silent> ,f <C-]>
" use ,F to jump to tag in a vertical split
nnoremap <silent> ,F :let word=expand("<cword>")<CR>:vsp<CR>:wincmd w<cr>:exec("tag ". word)<cr>
"Move back and forth through previous and next buffers
"with ,z and ,x