I'm editing a file with the following pattern:
# stock comment
# stock comment
# stock comment
# stock comment
# stock comment
conf
conf
conf
conf
very_long_conf_line_xxxxxx (600+ chars)
It's the stock layout and the file name ends with .conf
, so Vim picked it up with ft=conf
. It's actually some Nginx configuration, so I inserted a modeline like this:
# stock comment
# stock comment
# stock comment
# stock comment
# stock comment
# vim: set filetype=nginx:
conf
conf
conf
conf
very_long_conf_line (600+ chars)
However, when opening the file again, it's still taken as ft=conf
.
:verbose se ml?
shows modeline
and last set from ~/.vimrc line xx
, and :verbose se ft?
shows filetype=conf
and last set from /usr/share/vim/vim81/filetype.vim
.
Why isn't my mode line working? How do I get it to work?
I'm running Vim 8.1 from Ubuntu Eoan.