Massive CtrlP improvements

This commit is contained in:
ViViDboarder 2016-03-24 12:14:39 -07:00
parent 77ecc753e9
commit 61f9c512f5
1 changed files with 16 additions and 2 deletions

View File

@ -8,13 +8,27 @@ let g:ctrlp_map = '<C-t>'
let g:ctrlp_reuse_window = 'startify'
" Support tag jumping
let g:ctrlp_extensions = ['tag', 'buffertag']
" Support Apex language
" Don't search right away
let g:ctrlp_lazy_update = 100
" Quick exiting with <bs>
let g:ctrlp_brief_prompt = 1
" Support golang tags
let g:ctrlp_buftag_types = {
\ 'go' : {
\ 'bin' : 'gotags',
\ 'args' : '-sort -silent',
\}
\}
" When using slow built in search, limit max depth
let g:ctrlp_max_depth = 4
" When using slow built in search, limit max files
let g:ctrlp_max_files = 1000
" Use git ls-files when in a git project
let g:ctrlp_user_command = {
\ 'types': {
\ 1: ['.git', 'cd %s && git ls-files'],
\}
\}
" Leader Commands
nnoremap <leader>b :CtrlPBuffer<CR>
nnoremap <leader>t :CtrlPBufTag<CR>
@ -25,7 +39,7 @@ nnoremap <leader>m :CtrlPMRUFiles<CR>
" Special stuff for The Silver Searcher
if executable('ag')
" use ag for CtrlP
let g:ctrlp_user_command = 'ag %s -l --nocolor --nogroup -g ""'
let g:ctrlp_user_command['fallback'] = 'ag %s -l --depth 5 --nocolor --nogroup -g ""'
" ag is fast enough we don't need cache
let g:ctrlp_use_caching = 0
endif