开发者

Vim: how to change font color of current line number

i have line highlighting set in my .vimrc:

if v:version > 700
 set cursorline
 hi CursorLine ctermbg = Red guibg = #F5FBF6
endif

and line numbers on. Background and foreground of line numbers is set to:

highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermb开发者_开发问答g=NONE gui=NONE guifg=Black guibg=#589A5D

Current line is correctly highlighted but fore/back color of line number (this on the left side of editor) is the same. How can i change color of line numbers?

Cheers, jbk


Since this post is still showing up as a top search result for this problem and the top-voted answer is now out of date, I'll post a link to a more recent StackExchange question which provides the current answer.

Short version: in recent versions of vim, there is now a CursorLineNr highlighting group that allows you set a different color for the line numbering of the current line.


It looks like a bug in Vim that only certain forms of highlighting for CursorLine apply to the LineNumber column. I'm not sure whether the bug is that the CursorLine highlighting is being applied to the LineNumber column or if the bug is that not all of the ways CursorLine can be specified apply to the LineNumber column.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜