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

@@ -241,6 +241,7 @@ 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)
* `ctrl-m` - 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
* `,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)