5

After

% emacs -q

(split-window-right)
(scroll-bar-mode 0)
(fringe-mode 0)

there is still a pixel-wide line separating the two windows. What is this line called, and how can I change its width and colour? Can I replace it with a character such as |, as is used in the terminal?

Drew
  • 75,699
  • 9
  • 109
  • 225
Toothrot
  • 3,204
  • 1
  • 12
  • 30

2 Answers2

4

What you want to change is called the right-divider. By default you'll just see a vertical line.

Whether the right divider is shown or not is controlled by a frame-parameter called window-divider, which you can change by evaluating

(window-divider-mode)

You can call M-xcustomize-variable for window-divider-default-right-width to change the default size, and M-xcustomize-face for window-divider to change its colour. Note that changing the face will also affect the bottom-divider appearance.

rpluim
  • 4,605
  • 8
  • 22
  • customizing window-divider didn't do anything – Toothrot Jul 18 '18 at 13:16
  • I missed out the `(window-divider-mode)` step. Answer corrected – rpluim Jul 18 '18 at 13:46
  • 2
    There is still a line there without window-divider-mode. That's the line I'm talking about. – Toothrot Jul 18 '18 at 14:12
  • Yes, that's shown when you're not using window-divider-mode. I don't know of any way to get rid of it. – rpluim Jul 18 '18 at 14:50
  • 1
    If you turn off the fringe, via `M-x customize-variable fringe-mode`, and then customize the variables `window-divider` to match the color of your window background, and `window-divider-right-width` to 1, (both in the customization group `window-divider`, the bar is 'invisible' – Tyler Jul 18 '18 at 14:51
  • 1
    Or if you keep the fringe, just set the color of window-divider to match your fringe – Tyler Jul 18 '18 at 14:52
2

This is the vertical-border. You can set it like this:

(set-face-foreground 'vertical-border "green")

I don't know if it's possible to set the width, any further customisation would probably be done using window-divider-mode which 'covers' the vertical-border when it is turned on.

Iain
  • 194
  • 10