当前位置:网站首页>VIM is so difficult to use, why are so many people keen?
VIM is so difficult to use, why are so many people keen?
2022-04-22 04:55:00 【Experimental building V】

Click on the blue words Pay attention to our

Rumor has 240 Million programmers don't know how to quit Vim Editor , Is it really so difficult ? Now I've sorted out a copy for you Vim Common commands , Let you 10 Minutes to get started Vim, Have to fly up !
Please execute the following command in normal mode :
1. Move the cursor
j: Down
20j: Move down the 20 That's ok
k: Up
h: towards the left
l: towards the right
0: To the beginning of the line
^: To the first character at the beginning of the line , If there's a space in front of it
$: end
gg: Fast to the header
G: Fast to the end of the file
50G: Jump to the first place 50 That's ok
Please do not move the cursor in insert mode , It's inefficient .
2. Copy
yy: Duplicate a row
8yy: Copy down 8 That's ok
yw: Copy a word at the beginning of the cursor
y$: Copy the cursor to the end of the line
yfA: Copy the cursor to the first uppercase A In the middle
y2fA: Copy the cursor to the second uppercase A In the middle
3. shear
x: Cut back one character , If it's at the end of the line , It's cutting forward
4x: shear 4 individual
xp: Exchange two characters at the end of a non line , If you follow bs become sb
4. Delete
dd: Delete a line
100dd: Delete 100 That's ok
dw: Delete a word
df": Delete to the first double quotation mark that appears
d^: Delete to beginning of line
The deleted content is put on the clipboard , Press p You can paste it to other places .
5. Paste
p: Paste copied or cut content
5p: Paste the copied or cut content 5 Time

6. Replacement and cancellation
r+< Letters to be replaced >: Replace the letter of the cursor with the specified letter
R: Continuous replacement , Until pressed Esc
cc: Replace entire line , Delete the cursor row , And enter insertion mode
cw: Replace a word , Delete a word , And enter insertion mode
u{n}: Cancel once or n operations
U( Capitalization ): Undo all changes in the current line
Ctrl+r:redo, I.e. cancellation undo The operation of
7. Exit editor
wq: Save the current file and exit
wqa: Save all files and exit
q!: Do not save , Forced exit
qa!: There are multiple files open , Exit at the same time
Please execute the following commands in command mode
In normal mode , Input : You can enter .
Adjust the text
%s/$/sth/ : Add... At the end of the line sth
%s/^M//g : Replace dos A newline ,\^M Use ctrl+v + Enter You can enter
:g/^\s$/d* : Delete empty lines and lines with only spaces
%s/#.*//g : Delete # The following characters
you 're right , Here we use regular .
ce: Center the text content of this line
ri: Keep the text content of this line to the right
le: Keep the text content of this line to the left

Find string
In normal mode , Press down / Go straight to , Enter the corresponding string and press OK .
n: Find the next match
N: Find the last match
2n: Find the second match below
If you have any programming problems , Welcome to join the exclusive code exchange group of blue bridge cloud class ~


Stamp “ Read the original ”, Go to the course page !
版权声明
本文为[Experimental building V]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210737168426.html
边栏推荐
- Summary of topic brushing in April 22
- 【板栗糖GIS】supermap—如何为数据制造超链接
- Pydeck enables efficient visual rendering of millions of data points
- If you can convert a two-dimensional array into a one-dimensional array gracefully and quickly, or convert a multi-dimensional array into a one-dimensional array
- C language simple [stack and queue] (bracket matching problem)
- Image segmentation using deep learning: a survey
- One is based on Net core3 1's open source project helps you thoroughly understand the WPF framework prism
- POJ - 2456 aggressive cows
- Leetcode refers to offer 18 Delete the node of the linked list
- 菜鸟的逆袭之路
猜你喜欢

Carina 的根基与诞生背景|深入了解 Carina 系列 第一期

【板栗糖GIS】arcmap—模型构造器—批量裁剪栅格数据

Carina local storage selected into the CNCF cloud native panorama

Sharing of enterprise data leakage prevention scheme

2022.04.20华为笔试

Speech feature extraction of emo-db dataset

kaggle实战4.1--时间序列预测问题
![[stack and queue] simple application of C language ⌊ stack and queue realize each other, circular queue ⌉](/img/ac/d0d76fd109a53da73c624631f90c00.png)
[stack and queue] simple application of C language ⌊ stack and queue realize each other, circular queue ⌉

The role and risk of setsql using lamdbaupdatewrapper

Carina 本地存储入选 CNCF 云原生全景图
随机推荐
What is the difference between two-dimensional convolution kernel and three-dimensional convolution kernel in convolution neural network?
If the answer is yes or no, do you want to use one checkbox or two radio boxes? Which is more appropriate? Why?
Application of an open current transformer with switching value
cv2. drawContours()、cv2. findContours()、cv2. Usage analysis of boundingrect (IMG) function
【板栗糖GIS】arcmap—如何将多张影像合并成一张
Opencv usage record of neural network learning
KNN prediction minimum case summary
[selenium] basic application of unittest testing framework
Speech feature extraction of emo-db dataset
Carina 本地存储入选 CNCF 云原生全景图
EMO-DB 数据集的 Speech 特征提取
Climb the actor's name and add a link
PHP prompts unknown modifier when using regular
Error encountered when installing opencv
ObjectBox使用记录
2022.04.20 Huawei written examination
Leetcode sword finger offer 15 Number of 1 in binary
Leetcode refers to offer 43 Number of occurrences of 1 in integers 1 ~ n***
Cloud network integration - computing power center - roce / rmda and nvme / nvme of
Visio setting network topology