doc: Add FAQ entry explaining how to defer loading
This commit is contained in:
parent
c22e425e25
commit
7f76b03e0e
13
README.md
13
README.md
@ -2882,6 +2882,19 @@ executable first in your PATH when the virtual environment is active then if
|
|||||||
you set `g:ycm_python_binary_path` to just `'python'` it will be found as the
|
you set `g:ycm_python_binary_path` to just `'python'` it will be found as the
|
||||||
first Python and used to run [JediHTTP][].
|
first Python and used to run [JediHTTP][].
|
||||||
|
|
||||||
|
### I want to defer loading of YouCompleteMe until after Vim finishes booting
|
||||||
|
|
||||||
|
In recent versions of Vim, you can install YCM in a folder under
|
||||||
|
`~/.vim/pack/*/opt` and then load it once the user is idle via an autocommand:
|
||||||
|
|
||||||
|
```viml
|
||||||
|
augroup load_ycm
|
||||||
|
autocmd!
|
||||||
|
autocmd CursorHold, CursorHoldI * :packadd YouCompleteMe
|
||||||
|
\ | autocmd! load_ycm
|
||||||
|
augroup END
|
||||||
|
```
|
||||||
|
|
||||||
Contributor Code of Conduct
|
Contributor Code of Conduct
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user