如何在vimdiff中的垂直拆分和水平拆分之间切换? [英] How do I toggle between a Vertical and a Horizontal split in vimdiff?

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

问题描述

我已经知道如何使用diffopt变量启动具有水平/垂直分割的差异模式,但是当我已经打开两个文件进行比较时,如何在两者之间切换就不能了.

I already know how to use the diffopt variable to start diff mode with horizontal/vertical splits but not how to toggle between the two when I already have two files open for comparison.

我尝试了在中找到的可接受的答案>较旧的帖子,但无济于事. Ctrl + W命令对我不起作用.也许是因为我在Windows友好模式下运行gVim?

I tried the accepted answer found in this older post, but to no avail. The Ctrl+W commands didn't work for me. Perhaps because I'm running gVim in Windows-friendly mode?

推荐答案

以下命令会将垂直拆分更改为水平拆分:

The following command will change a vertical split into a horizontal split:

ctrl + w ,然后 J

要改回垂直拆分,请使用以下任一方法:

To change back to a vertical split use either:

ctrl + w H ctrl + w L

ctrl+w H or ctrl+w L

有关移动窗口的更多信息:

For more information about moving windows:

:h window-moving
:h ctrl-w_J
:h ctrl-w_K
:h ctrl-w_H
:h ctrl-w_L

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

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