How to force vim to syntax-highlight a file as html?

后端 未结 6 1131
你的背包
你的背包 2020-12-12 10:38

How do I set vim\'s syntax highlighting to treat a file extension as an html file?

I\'m using ez template, so the file\'s extension is .ezt. But a lot

6条回答
  •  借酒劲吻你
    2020-12-12 11:26

    Note that :set syntax=xml highlights properly but seems to fail when one is attempting to autoindent the file (i.e. running gg=G).

    When I switched to :set filetype=xml, the highlighting worked properly and the file indented properly.

提交回复
热议问题