Emacs 中更好的窗口导航? [英] Better window navigation in Emacs?

查看:26
本文介绍了Emacs 中更好的窗口导航?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 emacs 中多次拆分窗口时(在终端下),整个屏幕被分成几个部分,并按层次排列.在 vim 中,使用 Control-w + (h,j,k,l) 很容易直观地在窗口之间切换,但在 Emacs 中,我只能使用 Control-x + o 切换到另一个窗口",这可能需要几次迭代最终到达我想要的窗口.我想知道是否有类似于 Vim 的更好的方法来轻松地在窗口之间导航?

When I split window in emacs several times (under terminal) the whole screen is divided into several parts with hierarchical arrangement. In vim it is easy to switch between windows intuitively with Control-w + (h,j,k,l), but in Emacs I can only use Control-x + o to switch to "the other window", which probably would require several iterations to finally get to the window I intend. I wonder if there is a better way similar to that in Vim to easily navigate between windows?

推荐答案

你试过 WindMove?它与 Emacs 21+ 捆绑在一起.您可以使用 Shift-upShift-downShift-leftShift-right 四处移动您可以更改修饰符.来自文档:

Have you tried WindMove? It comes bundled with Emacs 21+. You move around with Shift-up, Shift-down, Shift-left, and Shift-right, though you can change the modifier. From the docs:

;; 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)

这篇关于Emacs 中更好的窗口导航?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆