Merge pull request #474 from lfilho/patch-1

Fix Ag functions
This commit is contained in:
Yan Pritzker 2014-04-29 20:58:22 -05:00
commit f83256cbb6

View File

@ -10,14 +10,14 @@ function! GetVisual()
return selection
endfunction
"git grep the current word using K (mnemonic Kurrent)
"grep the current word using K (mnemonic Kurrent)
nnoremap <silent> K :Ag <cword><CR>
"git grep visual selection
vnoremap K :<C-U>execute Ag(GetVisual())<CR>
"grep visual selection
vnoremap K :<C-U>execute "Ag " . GetVisual()<CR>
"git grep current word up to the next exclamation point using ,K
nnoremap ,K viwf!:<C-U>execute Ag(GetVisual())<CR>
"grep current word up to the next exclamation point using ,K
nnoremap ,K viwf!:<C-U>execute "Ag " . GetVisual()<CR>
"grep for 'def foo'
nnoremap <silent> ,gd :Ag 'def <cword>'<CR>
@ -40,4 +40,3 @@ nnoremap ,gcp :AgCurrentPartial<CR>
"Grep for usages of the current file
nnoremap ,gcf :exec "Ag " . expand("%:t:r")<CR>