Highlighting the current line in vim via the sign ('gutter') column

1

0

When using vim in a terminal, set cursorline results in the current line being underlined. I find this visually clunky and would prefer to only change the background (or foreground) color of the current line number in the sign (or 'gutter') column.

Does anyone know how this can be done?

Gearoid Murphy

Posted 2015-07-30T14:59:48.337

Reputation: 687

Answers

3

In your ~/.vimrc you can use

:set number
:set cursorline
:hi cursorline cterm=none
:hi cursorlinenr ctermfg=red

This stops the cursor line being drawn as a line in a colour terminal, but the line number at the cursor changes colour. I have vim 7.4. cursorlinenr is not in 7.3.

meuh

Posted 2015-07-30T14:59:48.337

Reputation: 4 273