vimrc - vim开了多个标签,如何快速直接退出?

查看:320
本文介绍了vimrc - vim开了多个标签,如何快速直接退出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

不想一个一个关闭,如何快速退出?

解决方案

交给你快速自己寻找答案的方法:

  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的一项基础技能. 同时做其他的事儿, 先看看有没有帮助文档之类的东西.

学习的知识是无限的, 可是学习的方法是有限的.

这篇关于vimrc - vim开了多个标签,如何快速直接退出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆