Reputation: 834
I am very new to Vim.
In other text editors, like Notepad++ and Sublime, when html is commented out, it becomes a different color. Is there a setting or command in Vim that can do this?
<div>Normal color</div>
<!--<div>This would be a different color</div>-->
<div>Normal color</div>
Upvotes: 0
Views: 81
Reputation: 10456
If you are editing a new file and haven't saved it yet, enable the syntax highlighting and set the file type to html
:
:syntax on
:set ft=html
File type is detected automatically when you save a file. Syntax highlighting however is disabled by default, so you may want to add this this to your .vimrc
:
syntax on
Upvotes: 1