Emacs: Visual Line Mode, Wrap Lines at Word Boundaries
Wrap Lines at Word Boundary
visual-line-mode to have soft-wrap. By default, this is off.
visual-line-mode to toggle on/off. Or, use the menu 〖Options ▸ Line Wrapping in this Buffer〗.
To toggle globally, call
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:
- Makes lines wrap at word boundaries. (controlled by var truncate-lines and word-wrap.)
- Makes up/down arrow keys move by a visual line. (controlled by the var line-move-visual.)
- Makes the
kill-linecommand delete by a visual line, as opposed to a logical line.
- Turns off the display of little return arrow at the edge of window. (controlled by the var fringe-indicator-alist.)
If all you want is to have soft wrap that doesn't cut words in middle, use
〔➤see Emacs: Novel Reading Mode〕
Hard Wrap Lines
or, buy something from Best Keyboard for Emacs