32317RE: bug in explicit :setf behavior?
- May 1, 2003Vince Negri wrote:
> > Essentially, one can do any number of explicitTrue, but not providing the possibility to load another filetype plugin
> > :setf somefiletype's after the initial filetype setting, but only
> > the first existing
> > ftplugin/somefiletype.vim
> > indent/somefiletype.vim
> > take effect.
> If you look at how the ftplugins work, you will
> see why there is this limitation. The plugins
> are written to assert their settings over a
> blank canvas, and won't necessarily remove
> the settings of a previous ftplugin. Thus, if
> the second ftplugin was allowed to run, you
> would get a mixture of settings.
isn't nice either. Currently you would have to do ":bwipe" and edit the
file again (making sure the right filetype is used this time).
> To remove this problem, each ftplugin scriptThat might not be a bad idea. How to implement this? We should at
> would have to provide an "uninstall" function
> which could be first called by the :setf command
> if it detected there was an already loaded
least make sure that old filetype plugins still work. Thus new filetype
plugins must provide their "uninstall" function somehow. Perhaps simply
by providing an "s:uninstall()" function?
hundred-and-one symptoms of being an internet addict:
129. You cancel your newspaper subscription.
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
- << Previous post in topic Next post in topic >>