Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs truncate lines in all buffers

Tags:

emacs

elisp

What can I put in my .emacs file so that all lines an any kind of buffer always truncate if too long. I do this mostly because I tend to open many frames and it gets hard to read on a small screen if my 80 char lines get wrapped 2 or 3 times over.

like image 696
Jesus Ramos Avatar asked Sep 28 '11 02:09

Jesus Ramos


1 Answers

Try M-x toggle-truncate-lines on a per buffer basis, to see if it does what you want.

In .emacs you'd put this, to make it default for all buffers.

(setq-default truncate-lines t)

You may also like:

(setq-default global-visual-line-mode t)

Which you can try out with M-x visual-line-mode (it also toggles.)

EmacsWiki references: visual-line-mode truncate-lines

like image 50
ocodo Avatar answered Sep 29 '22 16:09

ocodo