当前位置:网站首页>VIM editor knowledge summary
VIM editor knowledge summary
2022-07-04 22:58:00 【Song Xiaoyu】

1. Three models
Input vi/vim <filename> You can enter a file ( Whether this file exists or not ) Command mode of , Input wq Wait for the baseline command to exit the file command mode .
Schematic diagram of working mode

Command mode
Input
i o aWait to enter the input mode ;Input
:You can enter the baseline command modeThe input mode
except
EscOut of bond , Other keys are input ;Press
EscKey to exit the input mode , Enter command mode .last line node
Operation command with
enterEnd the baseline command mode ;Press
EscKey to exit the input mode , Enter command mode .
2. Introduction to commands in different modes
2.1 Command mode
Move the cursor
0Numbers 0, Move to the first character of this line$Move to the last character of this lineGMove to the last line of this filenGn Integers , Move to this file n That's okggMove to the first line of this file , amount to1Gn<Enter>n Integers , Subject to the current behavior , Move down the n That's okSearch for replacement *
/wordSearch under the cursor for a name word StringnContinue to find the content of the search string in the previous stepNContinue to look up the search string content of the previous stepCopy 、 Paste and delete **
x,Xx Indicates that the cursor is deleted The last character ;X Indicates that the cursor is deleted Previous characterddDelete the current line of the cursornddn Integers , Delete the downward position of the cursor n That's ok ( Start with the line where the cursor is )yyCopy the current line of the cursornyyn Integers , Copy cursor down n That's ok ( Start with the line where the cursor is )p,Pp To paste the copied data to the next line under the cursor , P Is pasted onto the upper line of the cursoruRecover the previous actionCtrl+rRedo the previous action.decimal point , Repeat the previous action
2.2 Relevant buttons for switching from command mode to input mode
Enter input mode
iEnter... From the current cursorIEnteraStart at the next character where the current cursor isAEnter at the last character of the current lineoLowercase letters o, At the current cursor Enter a new line at the next lineOCapital o, Enter a new line on the previous line where the current cursor isEnter substitution mode
rReplace a character where the cursor isRAlways replace the text where the cursor is , Until pressed ESC untilExit input mode
EscExit input mode , Go back to command mode
2.3 Switch the command mode to the bottom line command mode
Commands such as saving and exiting files
:wSave changes:qsign out vi Edit mode:wqSave the changes and exit vi Edit modeZZCapital letters z, Equate to:wq, Save the changes and exit vi Edit mode:<>!Add... After the order!Number , Indicates a forced operationLine number display operation
:set nuAccording to the line Numbers:set nonuCancel the display line number
Reference documents
边栏推荐
- Redis入门完整教程:有序集合详解
- 质量体系建设之路的分分合合
- Redis入门完整教程:客户端通信协议
- 啃下大骨头——排序(二)
- A complete tutorial for getting started with redis: hyperloglog
- Is Huatai Securities a nationally recognized securities firm? Is it safe to open an account?
- 攻防世界 misc 高手进阶区 a_good_idea
- Google Earth engine (GEE) - globfire daily fire data set based on mcd64a1
- PMO: compare the sample efficiency of 25 molecular optimization methods
- Talk about Middleware
猜你喜欢

MYSQL架构——逻辑架构

浅聊一下中间件

Redis démarrer le tutoriel complet: Pipeline

Close system call analysis - Performance Optimization

Business is too busy. Is there really no reason to have time for automation?

Redis getting started complete tutorial: Geo

10 schemes to ensure interface data security

On-off and on-off of quality system construction

Unity vscode emmylua configuration error resolution

Tla+ introductory tutorial (1): introduction to formal methods
随机推荐
SQL中MAX与GREATEST的区别
EditPlus--用法--快捷键/配置/背景色/字体大小
NFT insider 64: e-commerce giant eBay submitted an NFT related trademark application, and KPMG will invest $30million in Web3 and metauniverse
MYSQL架构——逻辑架构
The new version judges the code of PC and mobile terminal, the mobile terminal jumps to the mobile terminal, and the PC jumps to the latest valid code of PC terminal
The table is backed up in ODPs. Why check m in the metabase_ Table, the logical sizes of the two tables are inconsistent, but the number of
Detailed explanation of heap sort code
Redis入门完整教程:API的理解和使用
The overview and definition of clusters can be seen at a glance
Logo special training camp section II collocation relationship between words and graphics
On-off and on-off of quality system construction
Duplicate ADMAS part name
云服务器设置ssh密钥登录
Logo special training camp Section IV importance of font design
Summary of index operations in mongodb
页面关闭前,如何发送一个可靠请求
【剑指offer】1-5题
P2181 diagonal and p1030 [noip2001 popularization group] arrange in order
Redis introduction complete tutorial: client communication protocol
Talk about Middleware