,gd alias for git-grepping a ruby function definition

This commit is contained in:
yan 2012-02-05 12:50:35 -08:00 committed by Yan Pritzker
parent aba8e8f1da
commit ba510e401c
2 changed files with 4 additions and 0 deletions

View File

@ -271,6 +271,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
* `Cmd-*` - highlight all occurrences of current word (similar to regular `*` except doesn't move)
* `,hl` - toggle search highlight on and off
* `,gg` - GitGrep command line with a quote pretyped (close the quote yourself)
* `,gd` - GitGrep def (greps for 'def [function name]') when cursor is over the function name
* `,gcp` - GitGrep Current Partial to find references to the current view partial
* `//` - clear the search
* `,q/` - quickfix window with last search (stolen from Steve Losh)

View File

@ -18,3 +18,6 @@ vnoremap K :<C-U>execute GitGrep(GetVisual())<CR>
"git grep current word up to the next exclamation point using ,K
nnoremap ,K viwf!:<C-U>execute GitGrep(GetVisual())<CR>
"grep for 'def foo'
nnoremap <silent> ,gd :GitGrep 'def <cword>'<CR>