8

How can I make the vim column (:set cursor column) to be of a different color? This is what I see now:

enter image description here

Notice that the column color is of the same color that vim is using to mark my identation, etc (which I think is the background color). I would like to pick a different color.

Cheers :)

Goles
  • 11,599
  • 22
  • 79
  • 140

2 Answers2

14

Use this:

:highlight CursorColumn guibg=#404040

See :help hl-CursorColumn (to which :help 'cursorcolumn' redirected)

Benoit
  • 76,634
  • 23
  • 210
  • 236
5

If the cursorcolumn does not appear to be working as expected it could be because the cursor column color is too close to your background theme color. Try these steps to resolve this:

  • If you are using certain backgrounds (maybe a dark background for example) change the color of the column using something like :highlight CursorColumn guibg=#ff0000 for the gui version of vim. If you are not using the gui version of vim try this :highlight CursorColumn ctermbg=Grey

  • Make sure you are using version 6.3 or later of vim. This feature was not available before that time. If you are on an OS like CentOS or Red Hat that does not have a current version of vim you can compile it.

  • Make sure your vim is compiled with +syntax

myrkur
  • 25
  • 7
SnapShot
  • 5,464
  • 5
  • 42
  • 40