The "syntax.txt" chapter in the official Vim documentation says:

HTML comments are rather special (see an HTML reference document for the
details), and the syntax coloring scheme will highlight all errors.
However, if you prefer to use the wrong style (starts with <!-- and
ends with --!>) you can define:
        :let html_wrong_comments=1

The help text describes a "wrong style". But I didn't understand: How is the style "wrong"?


After searching through Steve Oualline's Vim book (New Riders Publishing, 2001), I realized what the answer was.

The "wrong style" includes a stray extra exclamation mark near the end.

<!-- Right style -->
<!-- Wrong style --!>

Why didn't I notice the extra mark the first time I read the help text? I guess I must have been reading it too fast.

Silly me!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.