mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2025-01-08 19:37:34 +00:00
Massive CtrlP improvements
This commit is contained in:
parent
77ecc753e9
commit
61f9c512f5
@ -8,13 +8,27 @@ let g:ctrlp_map = '<C-t>'
|
|||||||
let g:ctrlp_reuse_window = 'startify'
|
let g:ctrlp_reuse_window = 'startify'
|
||||||
" Support tag jumping
|
" Support tag jumping
|
||||||
let g:ctrlp_extensions = ['tag', 'buffertag']
|
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 = {
|
let g:ctrlp_buftag_types = {
|
||||||
\ 'go' : {
|
\ 'go' : {
|
||||||
\ 'bin' : 'gotags',
|
\ 'bin' : 'gotags',
|
||||||
\ 'args' : '-sort -silent',
|
\ '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
|
" Leader Commands
|
||||||
nnoremap <leader>b :CtrlPBuffer<CR>
|
nnoremap <leader>b :CtrlPBuffer<CR>
|
||||||
nnoremap <leader>t :CtrlPBufTag<CR>
|
nnoremap <leader>t :CtrlPBufTag<CR>
|
||||||
@ -25,7 +39,7 @@ nnoremap <leader>m :CtrlPMRUFiles<CR>
|
|||||||
" Special stuff for The Silver Searcher
|
" Special stuff for The Silver Searcher
|
||||||
if executable('ag')
|
if executable('ag')
|
||||||
" use ag for CtrlP
|
" 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
|
" ag is fast enough we don't need cache
|
||||||
let g:ctrlp_use_caching = 0
|
let g:ctrlp_use_caching = 0
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user