vim 的tabnew带来的惊喜-建立多标签

本文介绍了Vim编辑器中进行标签页管理的各种命令,包括新建、关闭、切换和定位标签页,如:tabnew、:tabclose、:tabonly、:tabprev、:tabnext等。这些快捷操作能帮助用户更高效地在多个文件间切换和组织工作空间。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

:tabnew       打开新的tab(Ctrl+N新建标签页,Ctrl+T在新标签页中打开选定的文件)
:tabclose      关闭当前的tab(Ctrl+W)
:tabonly        关闭所有其他的tab(Ctrl+Shift+W ) vim不区分ctrl+shift+字母和ctrl+字母
:tabprev       前一个(Ctrl+Shift+Tab)
:tabnext       后一个(Ctrl+Tab)
标准模式下:
gt , gT 可以直接在tab之间切换。

测试使用

tabnew test.py
效果如下:

直接tabnew命令

然后再打开文件,或者NERDTree命令,等同于打开了个新的vim标签。

:[count]tabe[dit]                               :tabe :tabedit :tabnew
:[count]tabnew
                Open a new tab page with an empty window, after the current
                tab page.  If [count] is given the new tab page appears after
                the tab page [count] otherwise the new tab page will appear
                after the current one. 
                    :tabnew     " opens tabpage after the current one
                    :.tabnew    " as above
                    :+tabnew    " opens tabpage after the next tab page
                                " note: it is one further than :tabnew
                    :-tabnew    " opens tabpage before the current one
                    :0tabnew    " opens tabpage before the first one
                    :$tabnew    " opens tabpage after the last one

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值