gpt4 book ai didi

Emacs find-file-other-window 命令垂直拆分缓冲区

转载 作者:行者123 更新时间:2023-12-03 19:33:32 24 4
gpt4 key购买 nike

我只是在一台新机器上设置 Emacs,我遇到了命令 find-file-other-window 的问题.我通常喜欢的工作方式是将框架水平拆分为两个窗口。我希望能够运行上述命令并让它在另一个窗口中打开文件,但大多数情况下它会将当前窗口水平拆分为 2 个新窗口。我如何让它停止这样做?谢谢。

编辑:还想指出,这只发生在我将框架缩放到足够大的尺寸时。

最佳答案

通常这个 Action 是由函数执行的split-window-sensibly ,并由两个变量控制,split-height-thresholdsplit-width-threshold .每
文件

If ‘split-height-threshold’ specifies an integer, WINDOW is at least ‘split-height-threshold’ lines tall and can be split vertically, split WINDOW into two windows one above the other and return the lower window. Otherwise, if ‘split-width-threshold’ specifies an integer, WINDOW is at least ‘split-width-threshold’ columns wide and can be split horizontally, split WINDOW into two windows side by side and return the window on the right. If this can’t be done either and WINDOW is the only window on its frame, try to split WINDOW vertically disregarding any value specified by ‘split-height-threshold’. If that succeeds, return the lower window. Return nil otherwise.



在我的系统上,默认值为 split-height-threshold是 80 和 split-width-threshold是160。我想你可以通过设置 split-width-threshold得到你想要的效果到更低的东西。或者你可以设置 split-height-threshold为零,防止它垂直 split ,或设置变量 split-window-preferred-function到不同的功能。任何这些都会影响,而不仅仅是 find-file-in-other-window ,而是所有分屏的功能。

关于Emacs find-file-other-window 命令垂直拆分缓冲区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51879921/

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