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

查看:144
本文介绍了更好的窗口导航在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-up Shift-down Shift-left Shift-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天全站免登陆