Saturday, August 9, 2008

Emacs Word Wrap

Real word wrapping in emacs isn't automatic, but here's how it can be done. I found these instructions at http://lispy.wordpress.com/2007/07/12/dark-secrets-of-emacs-word-wrapping/. It's not perfect; despite the comments on that website, I don't yet know how to make word-wrap work after vertical splitting. First, get longlines.el and put it somewhere. Then, add the following lines to your .emacs:

(load "/path/to/longlines.el" t t)
(autoload 'longlines-mode "longlines.el" "Minor mode for editing long lines." t)
;; Uncomment the next line to wrap by default in text mode
;;(add-hook 'text-mode-hook 'longlines-mode)

To activate manually, do M-x longlines. More info at http://www.emacswiki.org/cgi-bin/wiki/LongLines.

No comments: