Set column width for visual lines in Emacs

longlines-mode has been removed. For visual-line-mode, the simplest way is to make the window as narrow as you want it to be. You can do that with C-x 3 and then adjusting the size of the window. Or you can set a wide margin or wide fringes.


In response to this question I created a minor mode called window-margin that accomplishes what @Stefan suggested in his answer.

Turn on window-margin-mode with:

(add-hook 'text-mode-hook 'turn-on-window-margin-mode)

The way you can still do it without installing window-margin is to use the longlines-mode that ships with Emacs, but is being phased out since there are some problems with longlines-mode, but here's the old way to do it if you want:

Turn on longlines-mode with something like:

(add-hook 'text-mode-hook 'longlines-mode)

which wraps text at the fill-column.