gpt4 book ai didi

macos - 如何将 iswitch 缓冲区名称限制为 minibuffer 中的 1 行(在 osx 上升级 emacs 24.1 后行为发生变化)?

转载 作者:行者123 更新时间:2023-12-01 09:34:13 25 4
gpt4 key购买 nike

当我在 OSX 上升级到(vanilla)emacs 24.1 时,使用 iswitch 切换缓冲区的行为似乎有所不同。

当我按 ctrl-x b 切换缓冲区时,它不是将缓冲区列表限制为 1 行,而是通过将迷你缓冲区扩展为几行长来显示每个缓冲区,然后在我输入时逐步删除缓冲区我要切换到的缓冲区名称。

我发现每当我切换缓冲区以分散视觉注意力时,状态栏和迷你缓冲区就会上下颠簸,所以我想恢复以前的行为,它会切断 1 行之后的缓冲区名称。我该怎么做?

最佳答案

如果您想将 minibuffer 使用的行数全局限制为一行,这应该可以:

(setq max-mini-window-height 1)

来自 documentation: 的更多信息

The variable max-mini-window-height controls the maximum height for resizing the minibuffer window. A floating-point number specifies a fraction of the frame's height; an integer specifies the maximum number of lines; nil means do not resize the minibuffer window automatically. The default value is 0.25.

但是,如果您只想限制 iswitchb 使用的 minibuffer 行数,documentation对于 iswitchb-minibuffer-setup-hook 建议:

Iswitchb-specific customization of minibuffer setup.

This hook is run during minibuffer setup if `iswitchb' is active. For instance:

(add-hook 'iswitchb-minibuffer-setup-hook
(lambda ()
(set (make-local-variable 'max-mini-window-height) 3)))

will constrain the minibuffer to a maximum height of 3 lines when iswitchb is running.

关于macos - 如何将 iswitch 缓冲区名称限制为 minibuffer 中的 1 行(在 osx 上升级 emacs 24.1 后行为发生变化)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11285013/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com