当前位置:网站首页>退出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
边栏推荐
- [winui3] Écrivez une copie du gestionnaire de fichiers Explorer
- Spark FAQ sorting - must see before interview
- Spell it! Two A-level universities and six B-level universities have abolished master's degree programs in software engineering!
- Use model load_ state_ Attributeerror appears when dict(): 'STR' object has no attribute 'copy‘
- COM in wine (2) -- basic code analysis
- JS generates a specified number of characters according to some words
- New terminal play method: script guidance independent of technology stack
- Innovation training (XII) reptile
- Leetcode 1547: minimum cost of cutting sticks
- Excel protects worksheets and workbooks from damage
猜你喜欢
【数据库】MySQL基本操作(基操~)
【数据库】MySQL多表查询(一)
Use model load_ state_ Attributeerror appears when dict(): 'STR' object has no attribute 'copy‘
Simply drag objects to the item bar
Download PDF from HowNet (I don't want to use CAJViewer anymore!!!)
【数据库】MySQL单表查询
Innovation training (IV) preliminary preparation - server
Shanghai Hangxin technology sharing 𞓜 overview of safety characteristics of acm32 MCU
redis数据类型有哪些
Druid -- JDBC tool class case
随机推荐
Leetcode006 -- find the longest common prefix in the string array
C list field sorting contains numbers and characters
MySQL - index
Unity3D 实用技巧 - 理论知识库(一)
What are the redis data types
C language: spoof games
Excel uses the functions of replacement, sorting and filling to comprehensively sort out financial data
Learning Android V from scratch - UI
C# List字段排序含有数字和字符
Unity rawimage background seamlessly connected mobile
The object needs to add additional attributes. There is no need to add attributes in the entity. The required information is returned
泰克示波器DPO3054自校准SPC失败维修
Solve valueerror: argument must be a deny tensor: 0 - got shape [198602], but wanted [198602, 16]
General enumeration constant class
Leetcode003 -- judge whether an integer is a palindrome number
JS determines whether the numeric string contains characters
Arduino UNO r3+LCD1602+DHT11
跨境电商 | Facebook 和 Instagram:哪个社交媒体更适合你?
Spark optimization
Sword finger offer: the median in the data stream (priority queue large top heap small top heap leetcode 295)