I can enable syntax highlighting for a file that has an extension that is unknown to vim by doing the following
set syntax=c
Every time I switch tabs however, I have to renter the command. Is there any way to let vim know that a file with an extension .xyz
should be coloured with C syntax?
Put this at the end of your .vimrc
(I'm assuming you have autocommands enabled).
autocmd BufRead,BufNewFile *.xmlx set filetype=xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With