Hi ZyX!
On Fr, 28 Sep 2012, ZyX wrote:
>
> > " Make sure, the b:undo_ftplugin is also executed deleting the buffer
> > BufUnload * if exists("b:undo_ftplugin") | exe b:undo_ftplugin | endif
> >
> > But I am not sure, where to put this script. Perhaps also put this into
> > ftplugin.vim?
> According to the documentation, BufUnload event may be triggered when
> current and unloaded buffers are different. And, according to the same
It is not triggered when current and unloaded buffers are different, but
when it triggers, current buffer and buffer being unloaded might be
different. That is bufnr('%') can be different then "<afile>".
> doc, you must not change buffers on this event.
You should not move to another buffer and probably you shouldn't change
a buffer as well as this might cause problems. I don't see, how
resetting the actions being done by a filetype script might cause
problems in this case.
> Thus you must not put the above autocommand anywhere.
I disagree. The autocommand is there for a reason. Unsetting the effects
by a filetype plugin can be a reason to use this event.
regards,
Christian
--
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