vimrc - vim has multiple tabs open, how to exit quickly and directly?
ringa_lee
ringa_lee 2017-05-16 16:34:54
0
2
558

If I don’t want to close them one by one, how can I exit quickly?

ringa_lee
ringa_lee

ringa_lee

reply all(2)
左手右手慢动作

Leave it to you to quickly find the answer yourself:

  1. vim command line mode

:help quit and then Ctrl+d, as shown below, the keywords of the help document will appear, then complete your search and Enter.

  1. The detailed document of quit will appear, as follows:

此处省略3856个英文字符...往下照你就会发现qa这个关键命令.退出所有.但是我的文件需要保存一下,肿么办呢? 继续往下看.

*:qa* *:qall*
:qa[ll]        Exit Vim, unless there are some buffers which have been
        changed.  (Use ":bmod" to go to the next modified buffer).
        When 'autowriteall' is set all changed buffers will be
        written, like |:wqall|. {not in Vi}

:conf[irm] qa[ll]
        Exit Vim.  Bring up a prompt when some buffers have been
        changed.  See |:confirm|. {not in Vi}

:qa[ll]!    Exit Vim.  Any changes to buffers are lost. {not in Vi}
        Also see |:cquit|, it does the same but exits with a non-zero
        value.

此处省略一大串英文字符... 找到了wqa!, 退出所有之前,先保存一下.甚至还有xa!

:wqa[ll]! [++opt]
:xa[ll]!    Write all changed buffers, even the ones that are readonly,
        and exit Vim.  If there are buffers without a file name or
        which cannot be written for another reason, Vim will not quit.
        {not in Vi}

Learn to read help documents, which is a basic skill for learning Linux. While doing other things, first check if there are help documents or anything like that.

The knowledge to learn is unlimited, but the methods of learning are limited.

滿天的星座

:qa! Exit all.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template