Vim:向左/向右移动窗口? [英] Vim: Move window left/right?

查看:38
本文介绍了Vim:向左/向右移动窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Vim 中,是否可以向左或向右移动"窗口?例如,类似于 <c-w>rx,但左/右而不是上/下?

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}.

推荐答案

Ctrl w 给你windows 命令模式",允许以下修饰符:

Ctrl w gives you the "windows command mode", allowing the following modifiers:

  • Ctrl w + R - 向上/向左旋转窗口.

  • Ctrl w + R - To rotate windows up/left.

Ctrl w + r - 向下/向右旋转窗口.

Ctrl w + r - To rotate windows down/right.

您还可以使用带有导航键的windows 命令模式"来更改窗口的位置:

You can also use the "windows command mode" with navigation keys to change a window's position:

  • Ctrl w + L - 将当前窗口移动到最右边"

  • Ctrl w + L - Move the current window to the "far right"

Ctrl w + H - 将当前窗口移动到最左边"

Ctrl w + H - Move the current window to the "far left"

Ctrl w + J - 将当前窗口移动到最底部"

Ctrl w + J - Move the current window to the "very bottom"

Ctrl w + K - 将当前窗口移动到最顶部"

Ctrl w + K - Move the current window to the "very top"

查看:help window-moving 了解更多信息

Check out :help window-moving for more information

这篇关于Vim:向左/向右移动窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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