I have a file called
.aliases for bash and zsh, I put this line
# vim: set filetype=bash:
but if I make
: echo &ft
That should work. I tried that line myself and it worked. I could be that your 'modeline' option got set to 'nomodeline'. Try executing this and see what you get.
That will tell you the value of the 'modeline' option and if not the default, where it was last set.
Some Linux distributions set 'nomodeline' in /etc/vimrc or /usr/share/vim/vimrc as a security measure, even though the security problems with 'modeline' have long been fixed.
in ~/.vimrc you need to set following:
Adding just the following to my