> no, I think what fREW need is this :h undo_ftplugin
I could be wrong, but I really don't think undo_ftplugin is useful in this case. I'm not sure when undo_ftplugin gets executed, but the help you point out seems to imply it gets called when the user sets the file type on an existing buffer that already had a file type. In this case, the problem is that the window gets re-used for another buffer, and the window-local matching remains. A simple experiment shows that the use case given here does not execute the commands in b:undo_ftplugin: :e $MYVIMRC (filetype gets set to vim)\ :let b:undo_ftplugin.=' | echomsg "undid ftplugin"' :e thisisatest.c (filetype gets set to c, but no message appears) The message only appears when you change the file type of an existing buffer, for example if you were to :set ft=c instead of :e thisisatest.c. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
