You can force syntax highlighting for a language by setting syntax
:
:set syntax=html
If you'd also like to load filetype-specific settings, you should set filetype
instead. This is probably what you want:
:set filetype=html
Since you mention you're editing more than one such file, you can automatically set the filetype for a given extension using autocmd
:
:autocmd BufRead,BufNewFile *.<extension> setlocal filetype=html
You can also have this persist into future sessions by placing it in your vimrc
.