Search code examples
vim

How can I get the vertical line for cursorcolumn in Vim editor?


I have currently set cursorline and cursorcolumn in /etc/vimrc. I am unable to set the cursorcolum to show as vertical line. By default it is block and I was able to change it to underline, but vertical line does not work. This is what it's like:

enter image description here

This is what I would like see.

enter image description here

I have tried different options from different sites, but could not get a solution. Is it possible to do this?


Solution

  • To expand on my comment, the only styling attributes available are listed under :help highlight-term:

    bold
    underline
    undercurl       not always available
    underdouble     not always available
    underdotted     not always available
    underdashed     not always available
    strikethrough   not always available
    reverse
    inverse         same as reverse
    italic
    standout
    nocombine       override attributes instead of combining them
    NONE            no attributes used (used to reset it)
    

    to which you can add :help highlight-ctermbg for a solid rectangle.

    As you can see, there is no "sideline"/"rightline"/whatever attribute, so what you ask is impossible.

    Note that those limitations are not strictly speaking Vim's, as they are inherited from terminals and terminal emulators.