Closed doronbehar closed 3 years ago
BTW great plugin! Without you it'd have taken me a month to get errorformat
as I needed :).
This is a good change! The docs of setfiletype
explains it quite well:
:setf[iletype] {filetype} *:setf* *:setfiletype*
Set the 'filetype' option to {filetype}, but only if
not done yet in a sequence of (nested) autocommands.
This is short for:
:if !did_filetype()
: setlocal filetype={filetype}
:endif
This command is used in a filetype.vim file to avoid
setting the 'filetype' option twice, causing different
settings and syntax files to be loaded.
{not in Vi}
Since plugins autocommands are run after user ones, we can't override the filetype if we want to change it a little like @doronbehar shows.
Hi,
This is kind of hard to explain, and I can't really point to the right location in the docs that explains this, but the TL;DR of this change is:
Enable me to add something like this to my
filetype.vim
(While I set some extra settings to
ftplugin/nixpkgs.vim
).I've learned about this subtlety at https://github.com/neomutt/neomutt.vim/pull/4 .