суббота, 29 сентября 2012 г., 0:42:08 UTC+4 пользователь ZyX написал: > суббота, 29 сентября 2012 г., 0:15:33 UTC+4 пользователь Christian Brabandt > написал: > > >You may replace first "echom" with "setlocal" and see that > > > option is set for a wrong buffer. Your autocmd must not be used. > > > > You are changing buffers and wiping a buffer. I am not sure what you are > > trying to show here. > > Do what I suggested with :setlocal. *It will set options for the buffer that > **was not being unloaded***. ****Wrong**** buffer. > > And, by the way, you are using b:undo_ftplugin from the *wrong* buffer as > well. Because "b:" is *current* buffer scope and you must not touch buffer > that is not being unloaded.
To be more explicit: I do not want your autocommand to junk my ftplugin settings when I unload non-current buffer. And it happens every time I use bufkill plugin, which I use almost always (just in case you thought it is uncommon) to keep windows intact (apparently, not only me; and not only this plugin uses this technique for the same purpose). And it will junk ftplugin settings whenever the current buffer has b:undo_ftplugin (i.e. has settings to junk), not the unloaded one (this increases amount of casualties). -- 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
