Reputation: 198388
I have a html file, it has good colors in vim.
But I want to define some custom file types, they have html content, but with different suffix names. e.g. index.html -> index.myhtml
But when I open "index.myhtml", it has no colors, only black and white.
How to let the vim treat the ".myhtml" as ".html"?
Thanks in advance!
Upvotes: 0
Views: 48
Reputation: 198388
:set filetype=html
write in .vimrc
au BufNewFile,BufRead *.myhtml set filetype=html
Upvotes: 1