Is there a way to highlight only the current line number (in the left hand coloumn) in vim, without highlighting the background of the current line? Ideally, I would Like to make the current line number bold.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are two groups that determine highlighting of line displayed when
&cursorlineoption is active:CursorLineandCursorLineNR. First is used to highlight the whole line, second for the line number. So to achieve what you want you mustClear the highlighting of
CursorLine: justhi clear CursorLineafter any:colorschemeandset background=call.Set the highlighting of
CursorLineNRif it is not set in your colorscheme:(better to check whether it is already set in the colorscheme, maybe it will look better in that case).
You can join both autocommands in one of course.
CursorLineNRhas been added relatively recently around version7.3.488.