开发者

How to correctly highlight cursor line in VIM?

VIM can be configured to highlight current line via :hi cursorline guibg=green and set cursorline commands. But if I enable tabs display via:

:hi specialkey guifg=grey guibg=grey
:set listchars="tab"
:set list

Cursor line highlight will corrupt tabs dis开发者_如何学Pythonplay:

alt text http://dl.dropbox.com/u/239055/vim_cursorline_bug.png

Any hints how i can avoid corruption so may tabs are highlighted with one color and cursor line is highlighted with another color without any ^I displayed at intersection?


Try setting listchars without the quotes:

:set listchars=tab:>-

This shows the tab as >------- instead of ^I, which I think is what you were asking. When the cursor is on the line with the tab, the whole line is displayed in the cursorline colour.

It appears that the cursorline colour takes precedence over the specialkey colour, which is consistent with your screenshot.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜