I have a vim configuration file (~/.vimrc) with the following settings:

colo delek
syntax on

highlight clear CursorLine
highlight clear CursorLineNR
highlight clear LineNR

highlight LineNR cterm=none ctermfg=Yellow ctermbg=none
highlight CursorLineNR cterm=bold ctermfg=Black ctermbg=none

This used to work fine, highlighting the current line number in Black, while the others remained Yellow. After I read about syntax enable, I tried it, replacing the syntax on command. Since then, the CursorLineNR highlighting has refused to work. I have tried changing changing the syntax command to off, enable and on in all orders but to no avail. I even tried changing the CursorLineNR from the command-line mode but that too doesn't work. It has to be noted though that the LineNR functionality works perfectly fine.

I work on a Macbook Air, with the following vim version:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 29 2017 18:37:46)
Included patches: 1-503, 505-680, 682-1283
  • So you're saying that the highlight has the values you expect (according to return value of :hi CursorLineNR) but those values are, as far as you can tell, being ignored? – B Layer Sep 8 '18 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.