Saturday, March 26, 2016

Re: Packages: best practices?

Andy Wokula wrote:

> Am 26.03.2016 um 19:31 schrieb Nicola:
> > On 2016-03-26 17:56:34 +0000, Bram Moolenaar said:
>
> >> I suppose there is no easy way to know if VimEnter already fired.
>
> >> Perhaps we need a flag that indicatest this, so you can do:
> >>
> >> if v:vim_did_enter
> >> call s:init()
> >> else
> >> au VimEnter * call s:init()
> >> endif
> >>
> >> Something like that?
> >
> > For YCM, that would work. I don't know what else a plugin can do at startup that
> > would not do if loaded at a later time (other types of autocmds?).
> >
> > Nicola
>
> if has("vim_starting")
> " init on VimEnter
> else
> " init immediately
> endif

Ah, forgot about that one. And couldn't find it, it doesn't have a help
tag (added one).

Turns out it's very close to v:vim_did_enter. Should we revert adding
v:vim_did_enter ?

--
There are three kinds of persons: Those who can count and those who can't.

/// Bram Moolenaar -- Bram@Moolenaar.net -- 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_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment