Emacs: Visual Line Mode, Wrap Lines at Word Boundaries

Master emacs+lisp, benefit for life. Testimonials. Thank you for support.
, , …,

Wrap Lines at Word Boundary

Lines longer than window width can be displayed so that they are wrapped at word boundary, not cutting a word in half into the next line. This is done by having visual-line-mode on. By default, this is off.

emacs23 word wrap
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:

Like what you read?
Buy Xah Emacs Tutorial
or share some
blog comments powered by Disqus