I like to run my editor full-screen. The only thing is, though, that when I do this, the word wrap only kicks in when the line hits the right edge of the screen. I would like it to do so, already when the line hits, say, column number 200.
How do I do that?
I would like it to happen in all modes, e.g., Org-mode. I added the line (global-visual-line-mode t)
to my .emacs
file, in order for the word wrapping also to work in org-mode
.
I'm running Emacs 23.
I got it working! Here is what I added to my .emacs
file to make it happen:
(add-hook 'text-mode-hook 'turn-on-auto-fill) (add-hook 'text-mode-hook '(lambda() (set-fill-column 80)))
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.
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.
I think what you probably want is "M-x toggle-truncate-lines". That toggles between wrapping or requiring you to scroll right and left to see the entire line. This is actually a way better answer than the accepted one.
Type M-x auto-fill-mode to activate automatic line-wrapping after a certain column. Then set the actual line width through the variable fill-column
as described by user choroba (C-x f).
Note though that this works a bit differently from what other text editors do. M-q will re-format the current paragraph.
You can set the line width with C-xf (set-fill-column
).
Afterwards, you might need to hit M-q to reformat the current paragraph (fill-paragraph
), or select text to be justified and run fill-region
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With