当前位置:网站首页>退出vim的方法
退出vim的方法
2022-04-23 04:54:00 【黄佳俊、】
直接退出Vim
:q 退出当前Vim窗口,如果是当前窗口是最后一个窗口则退出Vim(或 :quit)。
:conf q 退出当前Vim窗口,如果当前窗口有修改,则给出提示进行选择(或 :confirm quit)。
:q! 强制退出当前Vim窗口并忽略所有更改,即使是当前缓冲区发生了修改也不进行保存(或 :quit!:)。
:cq 在任何情形下都直接退出Vim而不保存文件,并返回一个错误代码( 或 :cquit:)。
:qa 退出所有Vim窗口,除非存在修改过的缓冲区( 或 :qall:)。
:conf qa 退出所有打开的Vim窗口;如果存在修改过的缓冲区,则给出提示进行选择(或 :confirm qall:)。
:qa! 强制退出所有打开的Vim窗口,不保存任何修改的内容强行退出(或 :qall!:)
:e! 放弃所有修改,并打开原来文件。
保存文件并退出Vim
:wq:保存并退出.保存当前文件并退出Vim。如果文件只读或者该缓冲区无名,写回操作将失败。
:wq test.txt:保存当前Vim缓冲区中的内容到文件 test.txt 中并退出Vim。
:[range]wq test.txt:保存当前Vim缓冲区中由range界定的内容到文件 test.txt 中并退出Vim。
:[range]x test.txt:功能和 :[range]wq test.txt 类似, 但只有文件有修改时写入才会实际进行保存。
版权声明
本文为[黄佳俊、]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_48419914/article/details/124315453
边栏推荐
- 【数据库】表的查看、修改和删除
- Innovation training (10)
- Opencv + clion face recognition + face model training
- Learning Android V from scratch - UI
- Informatics Olympiad 1955: [11noip popularization group] Swiss round | openjudge 4.1 4363: Swiss round | Luogu p1309 [noip2011 popularization group] Swiss round
- Manually write smart pointer shared_ PTR function
- Innovation training (XI) airline ticket crawling company information
- Pixel mobile phone brick rescue tutorial
- Perfect test of coil in wireless charging system with LCR meter
- POI export message list (including pictures)
猜你喜欢

《2021多多阅读报告》发布,95后、00后图书消费潜力攀升

Learning Android II from scratch - activity

Teach you how to build the ruoyi system by Tencent cloud

DIY is an excel version of subnet calculator

Spark small case - RDD, spark SQL

【数据库】MySQL单表查询

Unity rawimage background seamlessly connected mobile

Set Chrome browser background to eye protection (eye escort / darkreader plug-in)
![[2021] Spatio-Temporal Graph Contrastive Learning](/img/7d/67a0bfa0adecee24bbe291a25ae906.png)
[2021] Spatio-Temporal Graph Contrastive Learning

Customize the navigation bar at the top of wechat applet (adaptive wechat capsule button, flex layout)
随机推荐
[2021] Spatio-Temporal Graph Contrastive Learning
Solutions to the failure of sqoop connection to MySQL
The last day of 2021 is the year of harvest.
Innovation training (VII) FBV view & CBV view
No such file or directory problem while executing shell
【数据库】MySQL基本操作(基操~)
JS détermine si la chaîne de nombres contient des caractères
Painless upgrade of pixel series
Solve valueerror: argument must be a deny tensor: 0 - got shape [198602], but wanted [198602, 16]
leetcode——启发式搜索
Code007 -- determine whether the string in parentheses matches
Use model load_ state_ Attributeerror appears when dict(): 'STR' object has no attribute 'copy‘
Spark optimization
Learning Android from scratch -- Introduction
List remove an element
[winui3] Écrivez une copie du gestionnaire de fichiers Explorer
Practice and exploration of knowledge map visualization technology in meituan
Flink case - Kafka, MySQL source
DIY 一个 Excel 版的子网计算器
Shanghai Hangxin technology sharing 𞓜 overview of safety characteristics of acm32 MCU