为什么 vim 在制表符处画下划线以及如何避免这种情况?
没有任何特定的规律,我的 vim 在选项卡位置显示下划线(见下文)。
有时,文本也会发生这种情况:我输入后,它带有下划线。
可能是什么原因?
Without any specific regularity my vim displays underlines on the place of tabs (see below).
Sometimes it also happens to the text: I type and it's underlined.
What could be a reason?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这可能是因为您正在编辑 html 文件,并且下划线附近的文本位于
标记内。
要禁用此功能,您可以将
let html_no_rendering=1
添加到~/.vimrc
中。但是,此设置还将禁用 html 文件的粗体和斜体样式。如果您只想禁用下划线,请参阅
:help html.vim
。它会向您提供有关需要重新定义哪些不带下划线的突出显示组的说明。This is likely due to the fact that you are editing an html file and the text near the underline is inside of an
<a>
tag.To disable this you can add
let html_no_rendering=1
to your~/.vimrc
. This setting will, however, also disable bold and italic styling for html files.If you wish to only disable the underlining, see
:help html.vim
. There it gives you instructions on what highlight groups you need to redefine withoutunderline
.此方法(从其他响应中拼凑而成)将仅在链接的文本部分下启用下划线,而不修改完整的 html.vim 语法文件。
将以下内容粘贴到该文件中:
This method (cobbled from other responses) will enable underline only under the text portion of the link without modifying the full html.vim syntax file.
Paste the following into that file:
这可能是两件事之一:
'list'
:(尝试:set list?
如果这显示list
,请尝试:set nolist
)
。如果它显示突出显示组,请输入hi GROUPNAME
确认突出显示(GROUPNAME 替换为尖括号中最后命名的组)。然后调整配色方案以消除下划线。映射以识别突出显示组:
It's probably one of two things, either:
'list'
set: (try:set list?
and if this sayslist
, try:set nolist
)<F3>
. If it shows a highlighting group, typehi GROUPNAME
to confirm the highlighting (with GROUPNAME replaced by the last named group in angle brackets). Then adjust your colour scheme to get rid of the underline.Mapping to identify highlight group: