Move vim settings out of plugins to ensure they all get correctly loaded after everything else [Fix #373]

This commit is contained in:
Yan Pritzker
2013-10-21 16:10:40 -05:00
parent 65a3ec3219
commit 46946c9b8b
55 changed files with 15 additions and 8 deletions

24
vim/settings/git-grep.vim Normal file
View File

@@ -0,0 +1,24 @@
"git grep the current word using K (mnemonic Kurrent)
nnoremap <silent> K :call CloseSingleConque()<CR>:GitGrep <cword><CR>
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
endfunction
"git grep visual selection
vnoremap K :call CloseSingleConque()<CR>:<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>