The following example sets fringe widths globally for all new frames that will be created. I like
face-spec-set, but the recommended approach is to use
M-x customize-face to control color. The width is adjustable to create a thin or thick vertical line on either side of the window.
(add-to-list 'default-frame-alist '(left-fringe . 8))
(add-to-list 'default-frame-alist '(right-fringe . 8))
'((((class color) (background light))
(((class color) (background dark))
The following is a reprint of a prior post of mine in another forum relating to this issue: https://emacs.stackexchange.com/a/5310/2287
There are a few ways to do this -- my preferred method is to set the frame defaults for the fringes:
(set-face-attribute 'fringe nil :background "red")
(add-to-list 'default-frame-alist '(left-fringe . 11))
(add-to-list 'default-frame-alist '(right-fringe . 0))
It is possible to set the windows fringes globally:
(setq-default left-fringe-width 11)
(setq-default right-fringe-width 0)
It is also possible to set the windows fringes locally:
(setq left-fringe-width 11)
(setq right-fringe-width 0)
Here is the doc-string for
Automatically becomes buffer-local when set.
Width of this buffer's left/right fringe (in pixels).
A value of 0 means no left/right fringe is shown in this buffer's window.
A value of nil means to use the left/right fringe width from the window's frame.
Setting this variable does not take effect until a new buffer is displayed
in a window. To make the change take effect, call `set-window-buffer'.