With emacs (non windows), I see '$' mark at the end of the line when the terminal width is narrow. Is there a way to break the long line to 开发者_如何学编程the next line instead of showing the '$' mark?
ADDED
M-x auto-fill-mode works fine for text-mode, but with org-mode, the $ mark remains with the auto-fill-mode.
You can get emacs to break long lines into multiple shorter lines with M-x fill-paragraph
or M-x fill-region
. You can also make this the default behavior with M-x auto-fill-mode
.
You can disable line truncation with M-x
set-variable
truncate-lines
nil
.
You can also put in your .emacs (setq-default truncate-lines nil)
to have that setting by default.
You can customize the word-wrap
variable to visually wrap lines. This should be similar to longlines-mode
, except it would use the buffer width rather than the fill column for wrapping.
You can alternatively use visual-line-mode
to both enable word wrapping, and also "Redefine simple editing commands to act on visual lines, not logical lines", which addresses a point that nominolo mentioned.
Set it for all buffers:
(setq truncate-lines nil)
Set it just for specific mode(org-mode for instance):
(add-hook 'org-mode-hook (lambda () (setq truncate-lines nil)))
For the current session only use command
M-x toggle-truncate-lines
Setting truncate-lines
to nil
will break long lines, but if press C-n
or downarrow
the cursor will jump to the next physical line, not the position displayed below the cursor.
When working with Tex, I usually switch on M-x longlines-mode
. It has its quirks, but it works reasonably well.
精彩评论