10

vim 窗口分屏之后尺寸调节

 2 years ago
source link: https://www.80shihua.com/archives/2769
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
vim 窗口分屏之后尺寸调节

vim 窗口分屏之后尺寸调节

vim分屏

vim可以水平分屏和垂直分屏,分屏命令

:split
:vsplit
:sp
:vs

可以通过下面的命令调整分屏窗口尺寸

:resize -3
:resize +3
:vertical resize -3
:vertical resize +3

上面分别实现减少高度3,增加高度3,减少宽度3,增加宽度3

最后我们可以将上述命令绑定按键

nmap   w-  :resize -3<CR>
nmap   w=  :resize +3<CR>
nmap   w,  :vertical resize -3<CR>
nmap   w.  :vertical resize +3<CR>

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK