This plugin evaluates the modeline during the autocmd BufRead event, which occurs before the modeline would normally be evaluated and, more importantly, before :filetype detect. This causes a filetype set in a modeline (e.g. // vim: set ft=foo :) not to work in cases that filetype
is set in ~/.vim/filetype.vim or a ftdetect script from a package.
This commit fixes the issue by moving the plugin to the package after directory which causes autocmd BufRead to be executed after :filetype detect as it would be if this plugin were not installed, which makes filetype (and any other settings) from the modeline override settings from ftdetect as they normally would.
This plugin evaluates the modeline during the
autocmd BufRead
event, which occurs before the modeline would normally be evaluated and, more importantly, before:filetype detect
. This causes a filetype set in a modeline (e.g.// vim: set ft=foo :
) not to work in cases that filetype is set in~/.vim/filetype.vim
or aftdetect
script from a package.This commit fixes the issue by moving the plugin to the package
after
directory which causesautocmd BufRead
to be executed after:filetype detect
as it would be if this plugin were not installed, which makes filetype (and any other settings) from the modeline override settings fromftdetect
as they normally would.Fixes: #20