当前位置:网站首页>Use and introduction of vim file editor
Use and introduction of vim file editor
2022-07-25 03:09:00 【Zhangshufen~】
1.vim Installation
First, we open a terminal to input directly vim, If the computer is not installed vim You will be prompted to install through the following code vim, The code will prompt you on the screen , Enter the code and press enter to install , Now let's talk about the solution to the installation failure .
Generally speaking, if the installation fails, we only need to update the software source , The order is as follows :
apt updata: Update standard software source perhaps apt -get updata: Update standard software source
After the update, install it through the code shown on the screen just now .
2.vim Introduction to the three modes of
Three models : Command mode Insertion mode ( Edit mode ) Last row mode
Schematic diagram of direct mode switching :

Aforementioned i,a,o What does that mean ? Command mode conversion insert mode , We press on the keyboard i,i It means to insert at the current cursor , Now you can edit , Now let's explain .
2.1 Command mode Switch to Insertion mode
a // After entering the current cursor, start to insert
i // Enter the current cursor position and start editing
A // Enter to the end of the current cursor line to edit
I // Enter the line header of the current cursor line to edit
o // Enter the next line under the current cursor to edit
O // Enter a line on the current cursor to edit
Add :x // Delete the character in the current position
Be careful : If you can't remember , Just remember one i, Then go in and , Move through the direction key , Build all remember .
2.2 Switch from command mode to last line mode
“:” // Setting and saving text
w : Save only
wq: Save and exit
x : Equate to wq
q: Just exit
q! : Forced exit
w newfile : Save as
set nu: According to the line Numbers
set nonu: Unlimited line number
set hlsearch: Set the highlight of search results
set nohsearch: Set search results not to highlight
For example, when we need to save and exit after editing the text , We need to press Esc Exit edit mode and enter command mode , Then input ":wq" enter This is to save the text and exit , Be careful , The colon here cannot be omitted .
“/” : Full text drill down on this article string for example /QWE
“?” : Full text up search string for this article string for example ?QWE
After searching , You can use commands :n: Then repeat the last search command ( Use in last line mode )
3.vim Common commands :

边栏推荐
- Use of stm32cubemonitor Part II - historical data storage and network access
- Print the common part of two ordered linked lists
- Riotboard development board series notes (6) -- buildreoot building system image
- Using one stack to sort another stack
- Clothing ERP | ten advantages of clothing ERP for enterprises
- Recursive and non recursive methods are used to realize the first order, middle order and second order traversal of binary tree respectively
- 05 - MVVM model
- JS written test question -- promise, setTimeout, task queue comprehensive question
- Handwriting promise
- Function of each layer of data warehouse
猜你喜欢

Request and response

Banana pie bpi-m5 toss record (3) -- compile BSP

kettle_ Configure database connection_ report errors

Learning Record V

Flink's study notes

JS foundation -- task queue and event loop

C: wechat chat software instance (wpf+websocket+webapi+entityframework)

The latest interview questions and analysis of software testing in 2022
![[stm32f103rct6] can communication](/img/24/71509bd0d74d43ce4a79b8126478ff.jpg)
[stm32f103rct6] can communication

IO (1) -io layering
随机推荐
Solve the error: could not find 'xxxtest‘
Resolve the error: org.apache.ibatis.binding.bindingexception
Keil compile download error: no algorithm found for: 08000000h - 08001233h solution
Riotboard development board series notes (VIII) -- building desktop system
Function of each layer of data warehouse
Print the common part of two ordered linked lists
JS foundation -- JSON
Operator explanation - C language
Recursive and non recursive methods are used to realize the first order, middle order and second order traversal of binary tree respectively
Vscode copy synchronization plug-in expansion
Web -- JDBC tool class writing
Publish the project online and don't want to open a port
Clothing ERP | ten advantages of clothing ERP for enterprises
Import and export using poi
hello csdn
Arduino + si5351 square wave generator
Time formatting
Domain driven model (DDD)
# CF #808 Div.2(A - C)
Three ways to solve your performance management problems