How do I close all open tabs at once?

后端 未结 8 1204
-上瘾入骨i
-上瘾入骨i 2021-01-29 17:28

If I have 10 tabs opened, I have to close each one using \":q\" separately.

How can I close them all at once?

8条回答
  •  没有蜡笔的小新
    2021-01-29 18:02

    I'm using the VIM plugin in VSCode and I was looking for a way to close all the tabs open on the current window.

    The commands :qa and :wqa didn't work because they closed all the tabs from all the windows.

    The command :tabonly closed all the tabs from the current window except the current tab.

    Because I'm usually only using 2 windows at the same time, the closer I managed to get to my need was to focus on the other window and run the command :

    :on
    

    (:only) it closes all the windows except the current one.

提交回复
热议问题