在 Vim 中快速从垂直拆分切换到水平拆分 [英] To switch from vertical split to horizontal split fast in Vim

查看:26
本文介绍了在 Vim 中快速从垂直拆分切换到水平拆分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Vim 中将当前窗口从水平拆分切换到垂直拆分,反之亦然?

我刚才不小心这样做了,但我再也找不到钥匙了.

I did that a moment ago by accident but I cannot find the key again.

推荐答案

Vim 邮件列表说(重新格式化以提高可读性):

Vim mailing list says (re-formatted for better readability):

改变两个垂直分割水平分割的窗口

To change two vertically split windows to horizonally split

Ctrl-w t Ctrl-w K

水平到垂直:

Ctrl-w t Ctrl-w H

说明:

Ctrl-w t 使第一个(左上)窗口成为当前窗口

Ctrl-w t makes the first (topleft) window current

Ctrl-w K 将当前窗口移动到最顶部的全角

Ctrl-w K moves the current window to full-width at the very top

Ctrl-w H 将当前窗口移动到最左边的全高

Ctrl-w H moves the current window to full-height at far left

注意 t 为小写,K 和 H 为大写.

Note that the t is lowercase, and the K and H are uppercase.

此外,只有两个窗口,似乎您可以删除 Ctrl-w t 部分,因为如果您已经在仅有的两个窗口之一,将其设为当前有什么意义?

Also, with only two windows, it seems like you can drop the Ctrl-w t part because if you're already in one of only two windows, what's the point of making it current?

这篇关于在 Vim 中快速从垂直拆分切换到水平拆分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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