5

I use set relativenumber in VIM, and cannot imagine my life without it.

What bothers me is that the numbers above and below 0 look the same. If I see the number 9, I don't know if I have to 9j or 9k to jump there at first glance (and often go in the wrong direction)

Is it possible to have the "negative" numbers a different color from the positive numbers, so I can tell them apart faster?

Thanks!

dlmeetei
  • 9,905
  • 3
  • 31
  • 38
user1637056
  • 382
  • 3
  • 18
  • 2
    IMHO it's impossible. You can highlight the current line to make it more clearly visible (`:h hl-CursorLine`, `h: hl-CursorLineNr`) – Ves Apr 05 '18 at 12:10
  • @Ves This seems to be as close as we may get. Would you mind turning your comment into a real answer? Especially showing the `set cursorline`/`highlight CursorLineNr ...` combination? – cmaster - reinstate monica Apr 05 '18 at 15:06

1 Answers1

1

Not sure if there is a way highlight it without much work. What I do have in my vimrc is

1) highlight the current line

2) set number(nu) as well along with relative number(rnu) which makes the current line number looks different. See the number 26, for example

enter image description here

dlmeetei
  • 9,905
  • 3
  • 31
  • 38