: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