Linux 中 GUI Emacs 中的换行
当我在 emacs GUI 中运行术语模式时,我遇到换行问题。当我在 xterm 中运行 emacs 时,它运行良好。当输出的行很长时,它会在我的提示下全部显示在同一行上。当我在 xterm 中启动 emacs,然后进入 term 模式时,它表现正常,将长线换行。
我运行:
aaronjg@aaronjg-desk:~$ echo $PATH
并获取。
aaronjg@aaronjg-desk:~$ usr/bin:/sbin:/bin:/usr/games:/home/aaronjg/kde/bin:/usr
When I run term mode in emacs GUI, I have issues with line wrapping. It runs fine when I am running emacs in xterm. When there is an output that has a very long line, it is all displayed on the same line, with my prompt. When I launch emacs in xterm, and then go to term mode, it behaves properly, wrapping the long line.
I run:
aaronjg@aaronjg-desk:~$ echo $PATH
and get.
aaronjg@aaronjg-desk:~$ usr/bin:/sbin:/bin:/usr/games:/home/aaronjg/kde/bin:/usr
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将其放入 .emacs 中:
这是它在 term.el 中发挥作用的地方:
Put this in .emacs:
Here's where it comes into play in term.el:
Emacs 中控制该行为的主要变量是 truncate-lines。检查它的值。也许您有一个配置文件将其设置为 true。在这种情况下,您应该能够通过将其添加到您的个人配置文件中来更改它:
The main variable to control that behaviour in Emacs is
truncate-lines
. Check its value. Maybe you have a configuration file that sets it to true. In that case you should be able to change that by adding this to your personal configuration file:要使 emacs 在您键入时“换行”,您有几种选择:
打开自动填充模式(次要模式),使用
Mx auto-fill-mode
这将很难包裹你的线条。换行由current-fill-column
变量的值控制使用
Mx longlines-mode
打开长线模式(也是次要模式),这将软换行你行。这里的换行由变量fill-column
控制,还有其他有趣的功能,例如在longlines-show-hard-newlines
控制下的硬换行符暴露。< /p>To cause emacs to "wrap" lines as you type you have a couple of choices:
Turn on auto-fill-mode (a minor mode) use
M-x auto-fill-mode
which will hard wrap your lines. Wrapping is controlled by the value of thecurrent-fill-column
variableTurn on longlines mode (also a minor mode) with
M-x longlines-mode
which will soft wrap you lines. Here wrapping is controled by the variablefill-column
, and there are other interesting features such as hard-newline exposure under the control oflonglines-show-hard-newlines
.