菜单 学习猿地 - LMONKEY

VIP

开通学习猿地VIP

尊享10项VIP特权 持续新增

知识通关挑战

打卡带练!告别无效练习

接私单赚外块

VIP优先接,累计金额超百万

学习猿地私房课免费学

大厂实战课仅对VIP开放

你的一对一导师

每月可免费咨询大牛30次

领取更多软件工程师实用特权

入驻
361
0

vim note write

原创
05/13 14:22
阅读数 88545

Try:

:vert sb N

which will open a left vertical split (by default, unless you have modified some options).

To open a split to the right, on the other hand:

:vert belowright sb N

You can use :split and :vsplit to divide the current area into two windows with the same buffer. If you supply an argument then one of the new windows is created with the argument as a file name used for the buffer in the new window

To gain more control over how the splits are created, you can combine the :vertical:leftabove and :rightbelow commands. Also of use are the the :sfind and :sb commands.

Examples

:vertical sb 3
Create a vertical split and show buffer number 3 in the window to the left.
:vertical rightbelow sfind file.txt
Create a vertical split and read file.txt into the buffer in the right window.
:rightbelow sfind file.txt
Create a horizontal split and read file.txt into the buffer in the bottom window.

Navigating splitsEdit

Use Ctrl-W followed by one of the hjkl movement keys.

 

发表评论

0/200
361 点赞
0 评论
收藏