vim左右栏高亮
我需要用不同的背景颜色突出显示第 72 列之外的任何内容。最好的方法是什么?一些编辑器所做的类似于可见行边距的东西也很好。是否可以?
一些背景:
语法类似于 Pascal,并且可以正常工作。
仅背景需要更改。前景已经按应有的方式突出显示。在某些情况下,字符串会超过 80 个字符,并且会超过 72 列限制,因此应突出显示为字符串。
编码标准与 COBOL 类似,第 72 列之外的所有字符应该由注释行组成。这些第 72 列评论确实以评论起始字符开头,并且正确突出显示。
I need to highlight anything beyond column 72 with a different background color. What's the best method? Something similar to a visible line margin that some editors do is also good. Is it possible?
Some background:
The syntax is a Pascal like, and works correctly.
Only the Background needs to change. The foreground is already highlighted as it should be. There are cases where a String will be more than 80 characters and will pass the 72 column limit, and should be highlighted as a string.
The coding standards are similar to COBOL and all characters beyond column 72 should by comment lines. These column 72 comments do start with the comment start character, and are highlighted properly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以
突出显示您不想要的字符。
(改编自此处)。
You can
which will highlight the characters you don't want.
(adapted from here).
您可以尝试以下操作:
这只会突出显示整个列。如果您希望它应用于所有选项卡/拆分,请使用
set
而不是setlocal
。请查看帮助文件了解更多详细信息。
You can try this:
That'll just highlight the whole column. Use
set
instead ofsetlocal
if you want it to apply to all tabs/splits.Check out the help file for more details.