From 2c47d141844f0ed15fe3e1476b14a2403c1c562a Mon Sep 17 00:00:00 2001 From: yan Date: Thu, 29 Mar 2012 13:40:59 -0700 Subject: [PATCH] Added ,gcf - git grep references to current file --- README.md | 1 + vim/plugin/settings/yadr-keymap.vim | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 134675e7..a53d40f1 100644 --- a/README.md +++ b/README.md @@ -291,6 +291,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke * `,gg` - GitGrep command line, type between quotes * `,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 + * `,gcf` - GitGrep Current File to find references to the current file * `//` - clear the search * `,q/` - quickfix window with last search (stolen from Steve Losh) * `,qa/` - quickfix Ack last search (Steve Losh) diff --git a/vim/plugin/settings/yadr-keymap.vim b/vim/plugin/settings/yadr-keymap.vim index 956ff786..4da63cf3 100644 --- a/vim/plugin/settings/yadr-keymap.vim +++ b/vim/plugin/settings/yadr-keymap.vim @@ -87,9 +87,12 @@ nnoremap :NERDTreeFind map :TComment imap :TCommenti -"open up a git grep line, with a quote started for the search +"GitGrep - open up a git grep line, with a quote started for the search nnoremap ,gg :GitGrep "" +"GitGrep Current Partial nnoremap ,gcp :GitGrepCurrentPartial +"GitGrep Current File +nnoremap ,gcf :call GitGrep(expand("%:t:r")) " hit ,f to find the definition of the current class " this uses ctags. the standard way to get this is Ctrl-]