Vim is a famous powerful and highly customizable text editor similar to Vi. It has improved and added many functions based on Vi. Vim is a free software. Today we will talk about the use of Vim editor.
NAME
vim - Vi IMproved, a program text editor#vi improvements
1. How to move the cursor
Ctrl+f | Move the screen down one page |
0 (number 0) | Move to the beginning of the line |
$ | Move to the end of the line |
G | Move to the end |
gg | Move to the first line |
n<Enter> | Move the cursor down n lines |
2. Find and replace
/word looks for a string named word under the cursor, cooperate with n, search downwards, and search upwards N.
3. Delete, copy and paste
dd delete the line where the cursor is located
yy Copy the line where the cursor is located
u Undo the last operation
ctrl+r Repeat the previous operation
Summarize
The above is the tutorial on using Vim editor in Linux introduced to you by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support for my website!