From e44e50e023cc5f4ad365156b969e643f6af39feb Mon Sep 17 00:00:00 2001 From: yan Date: Wed, 6 Jun 2012 22:15:43 -0700 Subject: [PATCH] Made conque and gitgrep play nice with each other by killing each other's windows to prevent sizing problems --- vim/bundle/skwp-vim-ruby-conque | 2 +- vim/plugin/settings/git-grep.vim | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/vim/bundle/skwp-vim-ruby-conque b/vim/bundle/skwp-vim-ruby-conque index ff1e84b..b1fdf8c 160000 --- a/vim/bundle/skwp-vim-ruby-conque +++ b/vim/bundle/skwp-vim-ruby-conque @@ -1 +1 @@ -Subproject commit ff1e84bf89cfd214303d9815f8688bc892cc648d +Subproject commit b1fdf8c456469468e6bf64e829faf50b102a7274 diff --git a/vim/plugin/settings/git-grep.vim b/vim/plugin/settings/git-grep.vim index 3359e28..24897f3 100644 --- a/vim/plugin/settings/git-grep.vim +++ b/vim/plugin/settings/git-grep.vim @@ -1,19 +1,20 @@ "git grep the current word using K (mnemonic Kurrent) -nnoremap K :GitGrep +nnoremap K :call CloseSingleConque():GitGrep + function! GetVisual() - let reg_save = getreg('"') - let regtype_save = getregtype('"') - let cb_save = &clipboard - set clipboard& - normal! ""gvy - let selection = getreg('"') - call setreg('"', reg_save, regtype_save) - let &clipboard = cb_save - return selection + let reg_save = getreg('"') + let regtype_save = getregtype('"') + let cb_save = &clipboard + set clipboard& + normal! ""gvy + let selection = getreg('"') + call setreg('"', reg_save, regtype_save) + let &clipboard = cb_save + return selection endfunction "git grep visual selection -vnoremap K :execute GitGrep(GetVisual()) +vnoremap K :call CloseSingleConque():execute GitGrep(GetVisual()) "git grep current word up to the next exclamation point using ,K nnoremap ,K viwf!:execute GitGrep(GetVisual())