我安装了ctrlp,但是在我点击CTRL或进入ctrlp之后,打开一个文件需要3秒。
这是我的配置:
let g:ctrlp_working_path_mode = 0
set wildignore+=*/tmp/*,*.swp,*.class
let g:ctrlp_custom_ignore = '\v[\/]\.(git|class)$'
let g:ctrlp_cache_dir = $HOME.'/.vim/ctrlp'
let g:ctrlp_clear_cache_on_exit = 0
" autosave and autoload session
let g:session_autosave = 'yes'
let g:session_autoload = 'yes'怎么啦?
发布于 2014-08-31 23:58:21
要加快CtrlP的速度,一个非常巧妙的技巧是安装ag(searcher),它可以通过以下方法进行配置:
"Use The Silver Searcher https://github.com/ggreer/the_silver_searcher
if executable('ag')
set grepprg=ag\ --nogroup\ --nocolor
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
let g:ctrlp_use_caching = 0
" ag is fast enough that you can disable caching.
endif但是,如果CtrlP在找到文件后速度较慢,我建议禁用缓存。这可能需要一段时间,因为它必须更新您的缓存,您已经将其配置为未被清除。
https://stackoverflow.com/questions/25544241
复制相似问题