在Emacs中更好的窗口导航?

fan*_*sid 20 vim emacs window editor

当我在emacs中分割窗口几次(在终端下)时,整个屏幕被分成几个部分,分层排列.在vim中,使用Control-w +(h,j,k,l)可以直观地在窗口之间切换,但在Emacs中,我只能使用Control-x + o切换到"其他窗口",这可能需要几次迭代,最终到达我想要的窗口.我想知道是否有更好的方式类似于Vim中的方便在Windows之间导航?

Tre*_*son 30

你试过WindMove吗?它与Emacs 21+捆绑在一起.你走动Shift-up,Shift-down,Shift-left,和Shift-right,但您可以更改修改.来自文档:

;; Installation:
;;
;; Put the following line in your `.emacs' file:
;;
;;     (windmove-default-keybindings)         ; shifted arrow keys
;;
;; or
;;
;;     (windmove-default-keybindings 'hyper)  ; etc.
;;
;; to use another modifier key.
;;
;;
;; If you wish to enable wrap-around, also add a line like:
;;
;;    (setq windmove-wrap-around t)
Run Code Online (Sandbox Code Playgroud)

  • 我强烈建议添加Trey的FrameMove库.WindMove和FrameMove结合使窗口导航变得轻而易举.http://trey-jackson.blogspot.com/2010/02/emacs-tip-35-framemove.html (4认同)