anon
anon

Reputation: 42707

Vim C C++ syntax highlighting

In the latest Vim:

Is there a way to define a '{' such that it's ignored by the C/C++ compiler (g++) but treated like a '{' in Vim synatx highlighting?

I've tried //{ but it's ignored by Vim too.

Upvotes: 0

Views: 3241

Answers (1)

Greg Hewgill
Greg Hewgill

Reputation: 994817

The whole point of syntax highlighting is to help indicate how the compiler will interpret your code. For example, if you miss a closing quote on a literal string, the syntax highlighting helps you to identify where you did that.

You're asking for a vim feature to do something that it's expressly designed to avoid doing.

Upvotes: 1

Related Questions