I have .zsh-theme
files (from oh-my-zsh
), but they are not syntax highlighted. I was able to get this done pretty easily with
autocmd BufEnter *.zsh-theme set filetype=sh
However, before I did that I tried adding a vim meta comment for a specific file
#vim: set filetype=sh
The addition of the #
apparently makes vim detect the file as a conf
file, but it seems that this command is ignored (i.e. it is not detected as a sh
file in spite of the comment). Is there any reason this may be happening?
Get rid of the word set (and add a space after the comment symbol)
This fits with the first form of modelines