gpt4 book ai didi

Emacs 重新排列拆分 Pane

转载 作者:行者123 更新时间:2023-12-04 11:39:34 24 4
gpt4 key购买 nike

如果我在(终端)Emacs 中工作并使用水平拆分在屏幕上有 2 个缓冲区:

+--------------------------+
| |
| |
| |
| |
+--------------------------+
| |
| |
| |
| |
+--------------------------+

然后我决定打开 slime repl,Emacs 将垂直拆分其中一个水平 Pane :
+--------------------------+
| |
| |
| |
| |
+-------------+------------+
| | |
| | slime |
| | |
| | |
+-------------+------------+

但我想要的是在右边有粘液,使用窗口的整个高度:
+-------------+------------+
| | |
| | |
| | |
| | |
+-------------+ slime |
| | |
| | |
| | |
| | |
+-------------+------------+

有什么简单的方法可以从 Emacs 自动给我的安排中获得我想要的安排(例如旋转安排),还是我自己明确关闭并重新拆分窗口?

编辑 |如果我当前正在使用完整的水平拆分,或者实际上不可能,我是否可以直接打开完整的垂直拆分也很好奇。

最佳答案

如果您喜欢预设的窗口配置,请查看“工作区管理”包:

  • Perspective为您提供命名工作区
  • Equilibrium Emacs Window Manager是类似但更复杂的工具,它允许配置弹出窗口的位置、窗口配置、缓冲区、字体和键绑定(bind)。

  • project management 上还有更多内容EmacsWiki 上的页面。

    对于您的第二个问题,这是我在配置中翻转水平/垂直拆分的内容(信用: https://github.com/yyr/emacs.d):
    (defun split-window-func-with-other-buffer (split-function)
    (lexical-let ((s-f split-function))
    (lambda ()
    (interactive)
    (funcall s-f)
    (set-window-buffer (next-window) (other-buffer)))))

    (defun split-window-horizontally-instead ()
    (interactive)
    (save-excursion
    (delete-other-windows)
    (funcall (split-window-func-with-other-buffer 'split-window-horizontally))))

    (defun split-window-vertically-instead ()
    (interactive)
    (save-excursion
    (delete-other-windows)
    (funcall (split-window-func-with-other-buffer 'split-window-vertically))))

    (global-set-key "\C-x|" 'split-window-horizontally-instead)
    (global-set-key "\C-x_" 'split-window-vertically-instead)

    关于Emacs 重新排列拆分 Pane ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17415235/

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