:set
--- 选项 ---
backspace=2 filetype=sh hlsearch syntax=sh viminfo='20,"50
cscopetag helplang=cn modified ttyfast t_Sb=^[[4%dm
cscopeverbose history=50 ruler ttymouse=xterm t_Sf=^[[3%dm
cscopeprg=/usr/bin/cscope
formatoptions=tcql
这个配置没有显示颜色
:set
--- Options ---
backspace=2 history=50 ttyfast
这个配置没有显示颜色
:set
--- Options ---
backspace=2 hlsearch ttyfast viminfo='20,"50 t_Sf=^[[3%dm
history=50 ruler ttymouse=xterm t_Sb=^[[4%dm
formatoptions=tcql
这个配置原来的空格显示黄色的背景色,特别难看。
后面用set nohls
果然空格就没有背景色了。
hlsearch 是高亮选择搜索的关键字。
原来我此前搜索替换了空格,所以就把所有空格染色了。
而set nohls,则以后的搜索都不会高亮所有搜索的关键字。所以空格也不会有颜色了。
本文探讨了Vim编辑器中配置项对颜色显示的影响,特别是如何通过设置避免空格被染色的问题。文中详细解释了hlsearch选项的作用及如何使用setnohls禁用高亮显示。
1万+

被折叠的 条评论
为什么被折叠?



