Emacs: Visual Line Mode, Wrap Lines at Word Boundaries

By Xah Lee. Date: . Last updated: .

Wrap Lines at Word Boundary

Call visual-line-mode to have soft-wrap. By default, this is off.

emacs23 word wrap
emacs M-x visual-line-mode off (top) and on (bottom) in emacs 23.

Call visual-line-mode to toggle on/off. Or, use the menu 〖Options ▸ Line Wrapping in this Buffer〗.

To toggle globally, call global-visual-line-mode.

To set it on or off permanently, put in your emacs init file:

(global-visual-line-mode 1) ; 1 for on, 0 for off.

(info "(emacs) Visual-Line-Mode")

Visual line mode actually does several things. From a user's point of view, it:

toggle-word-wrap

If all you want is to have soft wrap that doesn't cut words in middle, use toggle-word-wrap.

Emacs: toggle-word-wrap

〔►see Emacs: Novel Reading Mode

Hard Wrap Lines

Emacs: Hard Wrap Lines, fill-paragraph, unfill-paragraph

Like it? Buy Xah Emacs Tutorial. Thanks.

or, buy something from Best Keyboard for Emacs