forked from mutewinter/dot_vim
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathctrlp.vim
More file actions
30 lines (25 loc) · 876 Bytes
/
ctrlp.vim
File metadata and controls
30 lines (25 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
if exists('g:vundle_installing_plugins')
Plugin 'kien/ctrlp.vim'
finish
endif
" Ensure Ctrl-P isn't bound by default
let g:ctrlp_map = ''
" Ensure max height isn't too large. (for performance)
let g:ctrlp_max_height = 10
" Fix fix new windows opening in split from startify
let g:ctrlp_reuse_window = 'startify'
let g:ctrlp_mruf_max = 350
let g:ctrlp_mruf_default_order = 0
" Leader Commands
nnoremap <leader>t :CtrlPRoot<CR>
nnoremap <leader>b :CtrlPBuffer<CR>
nnoremap <leader>u :CtrlPCurFile<CR>
nnoremap <leader>m :CtrlPMRUFiles<CR>
if executable('ag')
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
" HatTip: http://robots.thoughtbot.com/faster-grepping-in-vim and
" @ethanmuller
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
endif