Vim split bar styling

Vim

Vim Problem Overview


How do I style or remove the grey bar that appears on window split?

enter image description here

Vim Solutions


Solution 1 - Vim

You'll need to edit your colorscheme. The highlight group is VertSplit.

If you want to get rid of the pipe characters you can set ctermbg and ctermfg to the same value.

###Additional information on styling vertical split borders*:

*Taken from ib. answer below.

In order to get rid of | characters, one should rather change vertical separator using:

:set fillchars+=vert:\ 

(note the significant whitespace after the '' character)

Solution 2 - Vim

highlight VertSplit cterm=NONE

Solution 3 - Vim

I kind of tweak it a little to make it look like there is no splitbar with something like this

hi LineNr guibg=bg
set foldcolumn=2
hi foldcolumn guibg=bg
hi VertSplit guibg=bg guifg=bg

Note that I'm using gvim so I'm using guibg to change the background guifg to change the foreground with the same color of my vim's background, if you're not using a gui and you're on terminal vim you should change the guibg and guifg parameters for ctermbg and ctermfg

Solution 4 - Vim

If you add a comment with " after the whitespace, you don't have a trailing white space. I don't like these, so my vim config shows them (vim-airline plugin) and I remove them regularly.

:set fillchars+=vert:\ "White space at the end

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionatpView Question on Stackoverflow
Solution 1 - VimromainlView Answer on Stackoverflow
Solution 2 - Vimphil pirozhkovView Answer on Stackoverflow
Solution 3 - VimDimitri AcostaView Answer on Stackoverflow
Solution 4 - VimSurfSimonView Answer on Stackoverflow