emacs中关于窗口的操作

来源:互联网 发布:淘宝店铺代运营方案 编辑:程序博客网 时间:2024/04/24 13:29

关于窗口操作

  1. 更改窗口大小的那些操作

    CommandKeyPurposeenlarge-window【Ctrl+x ^】increase heightshrink-window◇decrease heightenlarge-window-horizontally【Ctrl+x }】increase widthshrink-window-horizontally【Ctrl+x {】decrease widthshrink-window-if-larger-than-buffer【Ctrl+x -】shrink a window to fit its content.balance-windows【Ctrl+x +】make all windows same width/height
  2. 回退窗口配置

    在开启win-mode的情况下,可用用C-c 左方向键(winner-undo)来回退窗口配置, 也可以用C-c 右方向键(winner-redo)来重复窗口配置

  3. 保存/恢复窗口配置信息

    使用命令`window-configuration-to-register(C-x r w)`将窗口配置信息保存到Register中

    使用命令`jump-to-register(C-x r j)`将窗口配置信息从Register中还原

    重启Emacs后Register中的保存的配置信息会丢失,即使已经开始了desktop-save-mode,若要在不同session间保存Split-window Config,需要使用revive.el Package

  4. Make Screen Flow Side-by-Side for Widescreen

    你可以用两个side-by-side的buffer显示同一份文档,其中左边buffer的最底端链接的是右边buffer的最顶端. 当光标从左边buffer的最低端往下时,它出现在右边buffer的最顶端.

    1. M-x split-window-horizontally

    2. M-x follow-mode

  5. 如何实现快速窗口跳转

    开启winmove-default-keybindings就能用shift+方向键在不同window中跳转了.

    ;; use Shift+arrow_keys to move cursor around split panes(windmove-default-keybindings);; when cursor is on edge, move to the other side, as in a toroidal space(setq windmove-wrap-around t )


0 0
原创粉丝点击