Emacs:仅在minibuffer中禁用行截断 [英] Emacs: Disable line truncation in minibuffer only

查看:207
本文介绍了Emacs:仅在minibuffer中禁用行截断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 ido mode 进行文件& Emacs 23中的缓冲区切换。

I am using ido mode for file & buffer switching in Emacs 23.

如果目录中有多于一行的文件,以下选项可以调整minibuffer的大小:

The following options allow the minibuffer to be resized if there is more than one line worth of files in the directory:

(setq resize-mini-windows t) ; grow and shrink as necessary
(setq max-mini-window-height 3) ; grow up to max of 3 lines

但是,这仅在默认情况下未启用行截断时有效全局):

However, this only works if line truncation is not enabled by default (globally):

(setq-default truncate-lines t) ; Truncate, do not wrap lines

我喜欢这个选项用于我的主编辑窗口,但这也覆盖了以上功能在minibuffer中显示多行。 minibuffer中的行被截断,也不被包装。

I like this option for my main editing window, but this also overrides the above function to show more than one line in the minibuffer. The line in the minibuffer is truncated, not wrapped, also.

有没有办法为主编辑窗口启用行截断,只能在minibuffer中禁用? / p>

Is there a way to enable line truncation for the main editing window and only disable it in the minibuffer?

推荐答案

你只需要将 truncate-lines 变量设置为nil minibuffer 。最简单的方法是使用以下内容:

You just need to set the truncate-lines variable to nil for the minibuffer. The easiest way to do that is with the following:

(add-hook 'minibuffer-setup-hook
      (lambda () (setq truncate-lines nil)))

这篇关于Emacs:仅在minibuffer中禁用行截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆