Loading ...
Sorry, an error occurred while loading the content.

Re: how will a plugin know if Vim is currently starting?

Expand Messages
  • Hari Krishna Dara
    ... I will check if this works nicely for plugins also. -- Thanks, Hari ... __________________________________________________ Do You Yahoo!? Tired of spam?
    Message 1 of 3 , May 30, 2006
    • 0 Attachment
      On Fri, 26 May 2006 at 10:15pm, Eric Arnold wrote:

      > You could check:
      >
      > if bufnr("$") == 1 && !bufloaded(1)
      >
      > this seems to be the case when it's first sourcing .vimrc, anyway.
      >

      I will check if this works nicely for plugins also.

      --
      Thanks,
      Hari

      >
      >
      > On 5/26/06, Hari Krishna Dara <hari_vim@...> wrote:
      > >
      > > One of my plugins was using the VimEnter autocommand to initialize some
      > > of the values. The autocommand is added while the plugin is sourced, and
      > > is removed when the autocommand is triggered. The problem with this
      > > approach is that if the script is manually sourced *after* the vim
      > > session is completely started, the autocommand will never fire. My
      > > question is, is there a way for the plugin to detect if Vim is currently
      > > in startup mode? I haven't found any v: variable to do this (like
      > > v:dying), any there is no built-in function either.
      > >
      > > --
      > > Thanks,
      > > Hari
      > >
      > > __________________________________________________
      > > Do You Yahoo!?
      > > Tired of spam? Yahoo! Mail has the best spam protection around
      > > http://mail.yahoo.com
      > >
      >
      >

      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.