mirror of
https://github.com/spf13/spf13-vim.git
synced 2024-09-21 15:37:10 +00:00
Use ag or ack for ctrlp indexing if possible
This commit is contained in:
parent
127a75b029
commit
7272036bbe
29
.vimrc
29
.vimrc
@ -489,23 +489,22 @@
|
||||
\ 'file': '\.exe$\|\.so$\|\.dll$\|\.pyc$' }
|
||||
|
||||
" On Windows use "dir" as fallback command.
|
||||
if has('win32') || has('win64')
|
||||
let g:ctrlp_user_command = {
|
||||
\ 'types': {
|
||||
\ 1: ['.git', 'cd %s && git ls-files . --cached --exclude-standard --others'],
|
||||
\ 2: ['.hg', 'hg --cwd %s locate -I .'],
|
||||
\ },
|
||||
\ 'fallback': 'dir %s /-n /b /s /a-d'
|
||||
\ }
|
||||
if WINDOWS()
|
||||
let s:ctrlp_fallback = 'dir %s /-n /b /s /a-d'
|
||||
elseif executable('ag')
|
||||
let s:ctrlp_fallback = 'ag %s --nocolor -l -g ""'
|
||||
elseif executable('ack')
|
||||
let s:ctrlp_fallback = 'ack %s --nocolor -f'
|
||||
else
|
||||
let g:ctrlp_user_command = {
|
||||
\ 'types': {
|
||||
\ 1: ['.git', 'cd %s && git ls-files . --cached --exclude-standard --others'],
|
||||
\ 2: ['.hg', 'hg --cwd %s locate -I .'],
|
||||
\ },
|
||||
\ 'fallback': 'find %s -type f'
|
||||
\ }
|
||||
let s:ctrlp_fallback = 'find %s -type f'
|
||||
endif
|
||||
let g:ctrlp_user_command = {
|
||||
\ 'types': {
|
||||
\ 1: ['.git', 'cd %s && git ls-files . --cached --exclude-standard --others'],
|
||||
\ 2: ['.hg', 'hg --cwd %s locate -I .'],
|
||||
\ },
|
||||
\ 'fallback': s:ctrlp_fallback
|
||||
\ }
|
||||
"}
|
||||
|
||||
" TagBar {
|
||||
|
Loading…
Reference in New Issue
Block a user