Let ctrl-p find files with a leading dot
I am constantly forgetting that I can't use `ctrl-p` to open `.travis.yml` or any other file with a leading `.`. This change comes about after some discussion in general on how to handle this. Passing `--hidden` to the `ag` command allows it to find files with a leading `.`. Unfortunately, this also includes the content of your `.git` directory. To overcome this, we add `/.git/` to `agignore`.
This commit is contained in:
parent
2eb9145f6b
commit
cf624303b5
2 changed files with 2 additions and 1 deletions
1
agignore
1
agignore
|
@ -1,3 +1,4 @@
|
||||||
log
|
log
|
||||||
tags
|
tags
|
||||||
tmp
|
tmp
|
||||||
|
.git/
|
||||||
|
|
2
vimrc
2
vimrc
|
@ -68,7 +68,7 @@ if executable('ag')
|
||||||
set grepprg=ag\ --nogroup\ --nocolor
|
set grepprg=ag\ --nogroup\ --nocolor
|
||||||
|
|
||||||
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
|
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
|
||||||
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
|
let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""'
|
||||||
|
|
||||||
" ag is fast enough that CtrlP doesn't need to cache
|
" ag is fast enough that CtrlP doesn't need to cache
|
||||||
let g:ctrlp_use_caching = 0
|
let g:ctrlp_use_caching = 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue