简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM