当前位置:网站首页>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
边栏推荐
- How to send a reliable request before closing the page
- [Lua] Int64 support
- Analysis of environmental encryption technology
- 啃下大骨头——排序(二)
- Hit the core in the advanced area of misc in the attack and defense world
- 剑指 Offer 65. 不用加减乘除做加法
- Co create a collaborative ecosystem of software and hardware: the "Joint submission" of graphcore IPU and Baidu PaddlePaddle appeared in mlperf
- P2181 对角线和P1030 [NOIP2001 普及组] 求先序排列
- Notepad++--编辑的技巧
- Attack and defense world misc advanced grace-50
猜你喜欢

Install the gold warehouse database of NPC

新版判断PC和手机端代码,手机端跳转手机端,PC跳转PC端最新有效代码

Redis入门完整教程:Redis Shell

Redis入门完整教程:集合详解

Redis入门完整教程:Pipeline

PMO: compare the sample efficiency of 25 molecular optimization methods

One of the commonly used technical indicators, reading boll Bollinger line indicators

Attack and defense world misc master advanced zone 001 normal_ png

MySQL Architecture - logical architecture

Advanced area of attack and defense world misc 3-11
随机推荐
Redis入门完整教程:集合详解
UML图记忆技巧
云服务器设置ssh密钥登录
Logo special training camp Section IV importance of font design
Three stage operations in the attack and defense drill of the blue team
Summary of index operations in mongodb
集群的概述与定义,一看就会
Analog rocker controlled steering gear
Record: how to scroll screenshots of web pages on Microsoft edge in win10 system?
Attack and defense world misc advanced area can_ has_ stdio?
SPSS installation and activation tutorial (including network disk link)
How can enterprises cross the digital divide? In cloud native 2.0
Attack and defense world misc advanced grace-50
[Lua] Int64 support
Google Earth Engine(GEE)——基于 MCD64A1 的 GlobFire 日常火灾数据集
Naacl-22 | introduce the setting of migration learning on the prompt based text generation task
Google Earth engine (GEE) - globfire daily fire data set based on mcd64a1
MySQL Architecture - logical architecture
Taobao commodity review API interface (item_review get Taobao commodity review API interface), tmall commodity review API interface
Wake up day, how do I step by step towards the road of software testing