Skip to content

Commit

Permalink
Better match the default behavior of ctrl-P when using ag
Browse files Browse the repository at this point in the history
When using ctrl-p without ag, the pattern given is not treated as a regular expression. Additionally, the value passed when first opening ctrl-p is not actually a valid PCRE regex, and produces an error when used on Windows. This modifies the options to treat the pattern as a string literal, not a regular expression, resolving the Windows problem, and better matching the behavior of ctrl-p without Ag.
  • Loading branch information
sgrif committed Dec 19, 2015
1 parent f02eab0 commit aca2d1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vimrc
Expand Up @@ -64,7 +64,7 @@ if executable('ag')
set grepprg=ag\ --nogroup\ --nocolor

" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""'
let g:ctrlp_user_command = 'ag -Q -l --nocolor --hidden -g "" %s'

" ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
Expand Down

0 comments on commit aca2d1f

Please sign in to comment.