Add ag
mappings in vim
https://robots.thoughtbot.com/faster-grepping-in-vim - Create an `:Ag` command if none is defined. - map `\` in normal mode to set up the command for an argument
This commit is contained in:
parent
c0717e7bd7
commit
e51d8b73f0
1 changed files with 5 additions and 0 deletions
5
vimrc
5
vimrc
|
@ -72,6 +72,11 @@ if executable('ag')
|
|||
|
||||
" ag is fast enough that CtrlP doesn't need to cache
|
||||
let g:ctrlp_use_caching = 0
|
||||
|
||||
if !exists(":Ag")
|
||||
command -nargs=+ -complete=file -bar Ag silent! grep! <args>|cwindow|redraw!
|
||||
nnoremap \ :Ag<SPACE>
|
||||
endif
|
||||
endif
|
||||
|
||||
" Make it obvious where 80 characters is
|
||||
|
|
Loading…
Add table
Reference in a new issue