For various reasons, I oft want not to wrap long lines in terminals and editors. For example, this just destroys compiler output readability. This also bothers me when editing XML because the verboseness makes it hard to have sane line lengths. Anyway, here are some notes on disabling soft horizontal wrapping in various tools...
This is called "Auto Wraparound" in xterm. Disable it:
Ctrl + MiddleMouseclick and deselect "Auto-Wraparound".
- From bash:
printf %b '\033[?7l'
Disable it for specific stuff by piping output into either
less -S or
w3m. For example, the following pulls an RSS feed with my bookmarks into less with line-wrapping off:
$ curl -s http://del.icio.us/rss/rtomayko | less -S
Emacs calls this
Truncating Long Lines. When long line truncating is on,
emacs ends long lines with a straight arrows moving east (->) and lines are not wrapped. You can turn truncating off for a specific buffer by toggling the Options->Truncate Long Lines in this Buffer menu option, or with the following command:
M-x <RET> toggle-truncate-lines <RET>
Alternatively, you can set the default value for all buffers for the duration of a session with the following command:
M-x <RET> set-variable <RET> truncate-lines <RET> t
Or, add the following to your .emacs file to always trucate long lines:
(setq-default truncate-lines t)
You can toggle horizontal wrap in screen with Ctl+a r. Note that having wrap toggled one way in your terminal emulator and another way in GNU/Screen can really screw things up..