在特定列中更改Vim中的背景颜色 [英] Changing background color in vim at a certain column

查看:83
本文介绍了在特定列中更改Vim中的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够通过更改背景颜色(或者可能只是一行?)来突出显示vim中的环绕边距/文本宽度.许多IDE都有此功能.我嘲笑了我在说什么:

I'd like to be able to highlight the wrap margin/text width in vim by changing the background color (or maybe just a line?). A lot of IDEs have this. I mocked up what I'm talking about:

有人知道这可以在macvim还是gvim中完成吗?

Anyone know if this can be done in macvim or gvim?

推荐答案

尝试一下:

:match ErrorMsg '\%>80v.\+'

它将突出显示超过80个字符的文本,您可以使用任何自动换行宽度替换'80'.但是,它将仅突出显示超出宽度的字符,然后仅突出显示实际上超过宽度的行.

It will highlight text beyond 80 characters, you can replace '80' with whatever wrap-width you have. However, it will only highlight the characters that exceed the width, and then only on lines that are actually longer than the width.

检查 http://vim.wikia.com/wiki/Highlight_long_lines 了解更多信息,但他们几乎都完成了同一件事.

Check http://vim.wikia.com/wiki/Highlight_long_lines for more info, but they all pretty much accomplish the same thing.

这篇关于在特定列中更改Vim中的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆