Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you activate line-wrapping in Emacs?

Tags:

emacs

scroll

How do you use line-wrap (autoscrolling?) in emacs? So that the portion that doesn't fit on the screen isn't shown as opposed to shown on the next line?

like image 552
Peter Avatar asked Jun 04 '09 12:06

Peter


People also ask

How do I wrap text in Emacs?

Alternatively, press C-h v word-wrap in Emacs and follow the "customize" link near the end. This is the best answer and without using any modes.

What is line wrap mode?

Modes such as Long Lines wrap lines on word boundaries as you type, by inserting temporary line-ending characters. These are removed when you save the buffer to a file or copy its text for yanking elsewhere, so they are only for display purposes.

How do I turn on line wrap in Vim?

If you want to wrap lines in a specific area, move the cursor to the text you want to format and type gq followed by the range. For example, gqq wraps the current line and gqip wraps the current paragraph. The following sets a wrap margin of 2 characters from the right window border.


1 Answers

What you describe sounds more like linewrap than scrolling. If that's what you're actually interested in, it's controlled with buffer-local variable truncate-lines. You can use customization to set it globally, or use hooks. For example, I used to prevent linewrap in dired with this:

(add-hook 'dired-mode-hook (lambda () (setq truncate-lines t)))
like image 143
JB. Avatar answered Oct 21 '22 09:10

JB.