#1 autocommands are adding up

Hari Dara

If there is an existing instance of vim, cubiclevim uses
that instance to open the temp file for editing. This
wouldn't be normally a good idea, because I for one want
to keep my vim session clean, without cluttering it with
all kinds of files, and temp files would only make it
worse, but fortunately my first vim sessions is always
used for browsing source code (tags, id-utils and misc.
things), and I don't mind cluttering this, as this is a
different vim instance than the one I use for source code.
That said, I don't want to throw away this vim session
(which was already existing before I used cubiclevim)
after I am done with composing mail. But this means
that the next time I need to compose another email, the
same vim session will be reused. But cubiclevim doesn't
cleanup the autocommands before editing a new one
(may be assumes a fresh instance), so the
autocommands keep adding up. Normally, I use
autocommand group with the following pattern for this:

aug CubicleVim
au! " First cleanup any existing au commands.
au BufWritePost !start cscript //b c:/mailmsg.js %
aug END

Thanks for making this utility. I find it useful for
composing long emails.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks