搜尋

首頁  >  問答  >  主體

vimrc - vim開了多個標籤,如何快速直接退出?

#不想一個一個關閉,如何快速退出?

ringa_leeringa_lee2778 天前584

全部回覆(2)我來回復

  • ringa_lee

    ringa_lee2017-05-16 16:36:54

    交給你快速自己尋找答案的方法:

    1. vim命令列模式下

    :help quit 然後Ctrl+d, 如下圖, 出現幫助文件的關鍵字,然後,補全自己的搜尋,Enter.

    1. 會出現quit的詳細文件,如下:

    此处省略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}

    學會查看幫助文件,這是學習linux的一項基礎技能. 同時做其他的事兒, 先看看有沒有幫助文檔之類的東西.

    學習的知識是無限的, 可是學習的方法是有限的.

    回覆
    0
  • 滿天的星座

    滿天的星座2017-05-16 16:36:54

    :qa! 退出所有。

    回覆
    0
  • 取消回覆