diff --git a/README.md b/README.md index ef474b0..04f84db 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/vim/plugin/settings/git-grep.vim b/vim/plugin/settings/git-grep.vim index 386ba16..3359e28 100644 --- a/vim/plugin/settings/git-grep.vim +++ b/vim/plugin/settings/git-grep.vim @@ -18,3 +18,6 @@ vnoremap K :execute GitGrep(GetVisual()) "git grep current word up to the next exclamation point using ,K nnoremap ,K viwf!:execute GitGrep(GetVisual()) +"grep for 'def foo' +nnoremap ,gd :GitGrep 'def ' +