7

I have been configuring my VIM installation for days now, and it's just a few more days away from heavenly perfect. Only thing that is bugging me however, is the border width of the splits.

Is there any way to change the width of these? Or maybe just set the color of them to the same as the background?

enter image description here

I mean the clunky 6/7px vertical border displayed in this picture.

Mickel
  • 6,658
  • 5
  • 42
  • 59

2 Answers2

15

The split will always be one character cell wide. However you can

set fillchars+=vert:\|

and set the VertSplit highlight group to something appropriate, e.g.

hi vertsplit guifg=fg guibg=bg

in your colour scheme. Since the splits are drawn using the '|' character, the line will be broken rather than continuous which is unfortunate. Unless you can find a font that contains a full height bar (but remember that extended characters can't be used in options in the command line, but they can in the command window or in your vimrc).

If you do use a full height bar, you also need to make sure that 'linespace' is set to 0 (it defaults to 1 in gvim on Windows).

1983
  • 5,882
  • 2
  • 27
  • 39
  • 2
    I ended up using guifg=bg guibg=bg to "remove" it completely. – Mickel Jul 06 '13 at 19:44
  • Well, if you always have 'number' set, and you are highlighting line numbers in a different background colour to Normal, then that sounds like a neat trick. You might have gaps when you reach the end of the buffer though. – 1983 Jul 06 '13 at 19:49
  • Yeah, looks fantastic :) Btw, you know how to remove the "~"-characters that are repeated vertically under the line numbers as well? (just one red ~ visible in my picture, but they are repeated on all lines below where the line numbers ends) – Mickel Jul 06 '13 at 19:53
  • 1
    That uses the NonText highlight group. – 1983 Jul 06 '13 at 19:57
  • Uh, that will affect a few other things though. See `:h hl-NonText`. – 1983 Jul 06 '13 at 20:08
3

Vim has different options for font style, used in hi command.

for example: NONE, bold, underline, italic, reverse, undercurl..

for your needs, you could get your current highlighting of vertsplit by:

:hi VertSplit

From your screenshot, I guess you have gui(or term)=standout try to change it into NONE:

hi! VertSplit guifg=[yourFG] guibg=[YourBG] gui=NONE

or if you run vim in terminal:

hi! VertSplit ctermfg=[yourFG] ctermbg=[YourBG] term=NONE

this should give you a narrower split line.

check out :h hi too see details

Kent
  • 189,393
  • 32
  • 233
  • 301