Possible Duplicate:
Emacs, switch to previous window可能重复:Emacs,切换到上一个窗口
other-window
advances me to the next window in the current frame, but I also want a way to move back to the previous window.
other-window将我带到当前帧的下一个窗口,但我还想要一种方法回到上一个窗口。
Emacs has next-buffer
and previous-buffer
, but no analogous interactive functions for window navigation. Just other-window
.
Emacs具有下一缓冲区和前一缓冲区,但没有用于窗口导航的类似交互功能。只是其他窗口。
6 个解决方案
#1
32
Provide a negative argument with C-u - ("Control+U" then "minus"), or even more simply C-- ("Control minus").
用C-u - (“Control + U”然后“减去”)提供否定参数,或者更简单地用C--(“控制减去”)。
- Move to previous window: C-- C-x o
- Move to previous frame: C-- C-x 5 o
移至上一个窗口:C-- C-x o
移至上一帧:C-- C-x 5 o
From code, (other-window -1)
or (other-frame -1)
will do the same thing.
从代码,(other-window -1)或(other-frame -1)将做同样的事情。
Check out the help for the key you want to reverse (e.g. C-h k C-x o to show help for C-x o) and if it says "A negative argument..." you know you can use C--.
查看你要反转的密钥的帮助(例如C-h k C-x o以显示C-x o的帮助),如果它显示“否定参数......”,你知道你可以使用C--。
#2
17
This is an old post, but I just wondered the same. It seems there now is a function for this in Emacs: previous-multiframe-window
.
这是一个老帖子,但我只是想知道相同。现在似乎在Emacs中有一个函数:previous-multiframe-window。
I have it bound to C-x O
, as in uppercase letter o. Now I just throw in shift when I want to go backwards.
我把它绑定到C-x O,就像大写字母o一样。现在,当我想要倒退时,我只是投入班次。
(global-set-key (kbd "C-x O") 'previous-multiframe-window)
(global-set-key(kbd“C-x O”)'previous-multiframe-window)
#3
9
Put this in your .emacs, and bind it to whatever key you like
把它放在你的.emacs中,然后将它绑定到你喜欢的任何键上
(defun back-window () (interactive) (other-window -1))
#4
6
A slightly less annoying shortcut available by default isC-- C-x o
. That way you don't have to switch between Meta and Control while typing the prefixes.
一个稍微不那么烦人的快捷方式是C-- C-x o。这样,您在输入前缀时无需在Meta和Control之间切换。
#5
5
Different from what you asked for, but the windmove package lets you move between windows according to their relative screen locations, which can be much easier than repeatedly doing C-x o.
与你要求的不同,但是windmove包可以让你根据相对的屏幕位置在窗口之间移动,这比反复做C-x o容易得多。
#6
1
Instead of C-u -
, you can also give a negative prefix argument with just M--
(Meta-Minus) , i.e. switch to previous window with M-- C-x o
.
你也可以用M--(Meta-Minus)给出一个负前缀参数,而不是C-u - ,即用M-- C-x o切换到前一个窗口。
#1
32
Provide a negative argument with C-u - ("Control+U" then "minus"), or even more simply C-- ("Control minus").
用C-u - (“Control + U”然后“减去”)提供否定参数,或者更简单地用C--(“控制减去”)。
- Move to previous window: C-- C-x o
- Move to previous frame: C-- C-x 5 o
移至上一个窗口:C-- C-x o
移至上一帧:C-- C-x 5 o
From code, (other-window -1)
or (other-frame -1)
will do the same thing.
从代码,(other-window -1)或(other-frame -1)将做同样的事情。
Check out the help for the key you want to reverse (e.g. C-h k C-x o to show help for C-x o) and if it says "A negative argument..." you know you can use C--.
查看你要反转的密钥的帮助(例如C-h k C-x o以显示C-x o的帮助),如果它显示“否定参数......”,你知道你可以使用C--。
#2
17
This is an old post, but I just wondered the same. It seems there now is a function for this in Emacs: previous-multiframe-window
.
这是一个老帖子,但我只是想知道相同。现在似乎在Emacs中有一个函数:previous-multiframe-window。
I have it bound to C-x O
, as in uppercase letter o. Now I just throw in shift when I want to go backwards.
我把它绑定到C-x O,就像大写字母o一样。现在,当我想要倒退时,我只是投入班次。
(global-set-key (kbd "C-x O") 'previous-multiframe-window)
(global-set-key(kbd“C-x O”)'previous-multiframe-window)
#3
9
Put this in your .emacs, and bind it to whatever key you like
把它放在你的.emacs中,然后将它绑定到你喜欢的任何键上
(defun back-window () (interactive) (other-window -1))
#4
6
A slightly less annoying shortcut available by default isC-- C-x o
. That way you don't have to switch between Meta and Control while typing the prefixes.
一个稍微不那么烦人的快捷方式是C-- C-x o。这样,您在输入前缀时无需在Meta和Control之间切换。
#5
5
Different from what you asked for, but the windmove package lets you move between windows according to their relative screen locations, which can be much easier than repeatedly doing C-x o.
与你要求的不同,但是windmove包可以让你根据相对的屏幕位置在窗口之间移动,这比反复做C-x o容易得多。
#6
1
Instead of C-u -
, you can also give a negative prefix argument with just M--
(Meta-Minus) , i.e. switch to previous window with M-- C-x o
.
你也可以用M--(Meta-Minus)给出一个负前缀参数,而不是C-u - ,即用M-- C-x o切换到前一个窗口。