问题描述
我需要用不同的背景色突出显示第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?
某些背景:
语法类似于Pascal,并且可以正常工作.
The syntax is a Pascal like, and works correctly.
仅背景需要更改.前景已经高亮显示.在某些情况下,字符串超过80个字符并会超过72列的限制,应突出显示为字符串.
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.
编码标准与COBOL相似,并且在注释行之外的第72列之外的所有字符都应使用.这些第72列注释的确以注释开始字符开头,并已正确突出显示.
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.
推荐答案
您可以
:match DiffAdd '\%>72v.*'
将突出显示不需要的字符.
which will highlight the characters you don't want.
(改编自此处)
这篇关于vim左右栏突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!