Auto merge of #2473 - wincent:no-lazy, r=Valloric
No lazy # PR Prelude - [x] I have read and understood YCM's [CONTRIBUTING][cont] document. - [x] I have read and understood YCM's [CODE_OF_CONDUCT][code] document. - [x] I have included tests for the changes in my PR. If not, I have included a rationale for why I haven't. - [x] **I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.** # Why this change is necessary and useful See prior version of this PR (https://github.com/Valloric/YouCompleteMe/pull/2454) for more discussion. [cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md [code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2473) <!-- Reviewable:end -->
This commit is contained in:
commit
c182c0529b
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
|
||||
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
|
||||
---------------------------
|
||||
|
||||
|
@ -128,16 +128,7 @@ let g:ycm_goto_buffer_command =
|
||||
let g:ycm_disable_for_files_larger_than_kb =
|
||||
\ get( g:, 'ycm_disable_for_files_larger_than_kb', 1000 )
|
||||
|
||||
" On-demand loading. Let's use the autoload folder and not slow down vim's
|
||||
" startup procedure.
|
||||
if has( 'vim_starting' ) " loading at startup
|
||||
augroup youcompletemeStart
|
||||
autocmd!
|
||||
autocmd VimEnter * call youcompleteme#Enable()
|
||||
augroup END
|
||||
else " manual loading with :packadd
|
||||
call youcompleteme#Enable()
|
||||
endif
|
||||
call youcompleteme#Enable()
|
||||
|
||||
" This is basic vim plugin boilerplate
|
||||
call s:restore_cpo()
|
||||
|
Loading…
Reference in New Issue
Block a user