How to run/call CtrlP first time in the background - VIM

房东的猫 提交于 2019-12-02 04:17:24
nobe4

You cannot do that, in fact, vim isn't multi-threaded.

You can look over for NeoVim which is multi-threaded.

Alternativly, you could use the Unite plugin and the file_rec/async command :

Note: with large projects this may cause some performance problems. Normally it is recommended to use |unite-source-file_rec/async| source, which requires |vimproc|.

If you need to speed up indexing of CtrlP, you can use ag to grep files, exclude some folders and files from indexing, and set cache location.

To do that, put these lines in your .vimrc:

let g:ctrlp_cache_dir = $HOME . '/.cache/ctrlp'
let g:ctrlp_user_command = 'ag %s -i --nocolor --nogroup --hidden
  \ --ignore .git
  \ --ignore .svn
  \ --ignore .hg
  \ --ignore .DS_Store
  \ --ignore "**/*.pyc"
  \ -g ""'
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!