Vim C C++语法高亮
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
语法突出显示的全部目的是帮助指示编译器将如何解释您的代码。例如,如果您错过了文字字符串的结束引号,语法突出显示可以帮助您识别在何处执行此操作。
你要求 vim 功能做一些它明确设计要避免做的事情。
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.