Emacs: Visual Line Mode, Wrap Lines

By Xah Lee. Date: . Last updated: .

Wrap Lines at Word Boundary

Alt+x 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.

Alt+x visual-line-mode to toggle on/off for current buffer.

To toggle globally, Alt+x 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.

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, Alt+x toggle-word-wrap.

Emacs: toggle-word-wrap

[see Emacs: Novel Reading Mode]

Hard Wrap Lines

Emacs: Hard Wrap Lines

Line Wrap Topic

  1. Emacs: Hard Wrap Lines
  2. Emacs: Toggle Line Wrap
  3. Emacs: Reformat Lines for Source Code
  4. Emacs: Visual Line Mode, Wrap Lines
  5. Emacs: Novel Reading Mode
  6. Emacs: toggle-word-wrap
Like my tutorial? Put $5 at patreon

Or Buy Xah Emacs Tutorial

Or buy a nice keyboard: Best Keyboard for Emacs