I remember I found a sample .emacs-file once, where long lines were truncated. I know about the build-in modes, but this mode behaved differently. It kept every line the same length, and didn't fill up the entire screen. Like this:
bla bla bla bla bla bla
bla bla bla bla bla bla
instead of
bla bla bla bla bla bla bla bla bla bla bla bla
If I end the first line with a newline (enter), then the rest of the lines follows this maximum length.
I want this because it makes it easie开发者_如何学Pythonr to read on a big widescreen monitor. Hope you understand what I mean :) Thanks in advance!
I'm not sure what you want to achieve, so I can just propose two modes I know:
auto-fill-mode
makes a newline if the line reaches 80 chars (or so)visual-line-mode
makes emacs act like a "usual" text editor (w.r.t. line wrappings)
You may use fill-paragraph
to truncate long lines (select the long lines first). Its default key binding is M-q
. Meanwhile, you can also enable auto-fill-mode
to truncate long lines automatically.
精彩评论