modeline needs to be set for it to work

less than 1 minute read

Note that in order for vim modelines to work, you must have the ‘modeline’ option set, i.e. :set modeline. Do a :help modeline for more info.