In The Armchair

Emacs Word Wrap

Posted in Computers by Armchair Guy on August 9, 2008

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.

Advertisements
Tagged with:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: