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

2006-05-30 Thread Hari Krishna Dara
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 <[EMAI

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

2006-05-26 Thread Eric Arnold
You could check: if bufnr("$") == 1 && !bufloaded(1) this seems to be the case when it's first sourcing .vimrc, anyway. On 5/26/06, Hari Krishna Dara <[EMAIL PROTECTED]> wrote: One of my plugins was using the VimEnter autocommand to initialize some of the values. The autocommand is added wh

how will a plugin know if Vim is currently starting?

2006-05-26 Thread Hari Krishna Dara
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 complet