将当前窗口切换到上一个当前窗口
我经常打开两个 Vim 窗口(带有 :vsplit
)。是否有一个命令或命令序列可以将我当前(选定的)窗口切换到之前的当前窗口。
因此,如果我有两个窗口显示,并用垂直分割将它们分开(左侧窗口是当前窗口),并且我执行组合键 Ctrl-W J(将当前窗口移动到右侧窗口),是否可以输入一个组合键将我切换回左侧窗口,如果我再次输入该组合键会将我切换回右侧窗口?
I frequently have two Vim windows open (with a :vsplit
). Is there a command, or sequence of commands, that will switch my current (selected) window to the window that was previously current.
So if I have two windows displays, with a vertical split separating them (with the left window being the current window), and I execute the key combo Ctrl-W J (move the current window to the right window), is there a key combo I can type that will switch me back to the left window, which if I type again will switch me back to the right window?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Ctrl-W P (P 代表上一个)应该可以解决问题。我建议你也做
:help window
,你可能会学到有趣的东西。Ctrl-W P (P stands for previous) should do the trick. I suggest you do
:help window
as well, you might learn interesting stuff.尝试 Ctrl-W W (实际上 mb14 的答案更好,因为如果只打开 2 个窗口,这将可以正常工作)
Try Ctrl-W W (actually mb14's answer is better since this will work ok if only 2 windows are open)