Nicola wrote:
> >> On 2016-07-03 20:24:27 +0000, bstaletic (Vim Github Repository) said:
> >>
> >>> If YouCompleteMe is placed in $HOME/.vim/pack/ycm/start/YouCompleteMe
> >>> it works perfectly, but if it is place in opt in stead of start it
> >>> doesn't even load.
> >> As the manual says, packadd just sources the plugin file. YCM does some
> >> initialization on VimEnter, and that needs to be performed manually:
> >>
> >> packadd youcompleteme
> >> call youcompleteme#Enable()
> >
> > Since :packadd is new it's not unexpected that some scripts, that were
> > written to be loaded on startup, don't completely work when started in
> > another way.
> >
> > It should be easy to fix, the script can detect that VimEnter has
> > already happened and instead call the function right away. There
> > actually is an example right at the help for VimEnter:
> >
> > if v:vim_did_enter
> > call s:init()
> > else
> > au VimEnter * call s:init()
> > endif
>
>
> That's what the proposed pull request does. It checks `has('vim_starting')`
> rather than `v:vim_did_enter`, but that should be also ok, shouldn't it?
>
> (Correct me if I'm wrong: `v:vim_did_enter` has been introduced only recently,
> so using `vim_starting` may be compatible with older versions.)
Yes, I saw the pull request after writing this. Looks like it all fits
together.
Using v:vim_did_enter is more precise, about when VimEnter triggers.
Avoids corner cases and dependency on how it works exactly.
--
Some of the well known MS-Windows errors:
ETIME Wrong time, wait a little while
ECRASH Try again...
EDETECT Unable to detect errors
EOVER You lost! Play another game?
ENOCLUE Eh, what did you want?
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.