问题描述
在 Vim 中,是否可以向左或向右移动"窗口?例如,类似于 <c-w>r
或 x
,但左/右而不是上/下?
In Vim, is it possible to "move" a window to the left or right? Eg, similar to <c-w> r
or <c-w> x
, but left/right instead of up/down?
例如,如果我有这个布局:
For example, if I've got this layout:
+---+---+---+
| | +---+
| A +---+---+
| | | |
+---+---+---+
我想把它变成这样:
+---+---+---+
| | +---+
+---+ A +---+
| | | |
+---+---+---+
用 做这件事很困难/很烦人{H,J,K,L}
.
推荐答案
给你windows 命令模式",允许以下修饰符:
gives you the "windows command mode", allowing the following modifiers:
+ - 向上/向左旋转窗口.
+ - To rotate windows up/left.
+ - 向下/向右旋转窗口.
+ - To rotate windows down/right.
您还可以使用带有导航键的windows 命令模式"来更改窗口的位置:
You can also use the "windows command mode" with navigation keys to change a window's position:
+ - 将当前窗口移动到最右边"
+ - Move the current window to the "far right"
+ - 将当前窗口移动到最左边"
+ - Move the current window to the "far left"
+ - 将当前窗口移动到最底部"
+ - Move the current window to the "very bottom"
+ - 将当前窗口移动到最顶部"
+ - Move the current window to the "very top"
查看:help window-moving
了解更多信息
Check out :help window-moving
for more information
这篇关于Vim:向左/向右移动窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!