Detailed explanation of Linux VIM utility command


Linux common commands

– learned

CD RM (followed by RF to delete files or folders) ls (view files and folders under the current path) MKDIR (create folder) touch (create file)
Cat MV rmdir whoamI PWD
– / ා the root directory Linux system has no drive letter, only the root directory /.
– CD directory jump
– CP ා copy file CP < file under current folder > < destination folder > / < file name >
Copy folder CP – RF < folder > < target folder >
– Find – find file find / (path) – name ‘*. Py’
Find / (path) – size 1024 (+ where 1024 is greater than 1024; – where 1024 is less than 1024)
Sudo find… Sudo get permission

VIM common commands

Cursor positioning;

Hjkl moves up, down, left and right

0 $jump to the beginning or end of a line

GG Shift + G jumps to the beginning or end of the entire file

1g, 2G, 3G….. Ng, skip to the beginning of line 1.2.3 n

/String (n n can be looped) to quickly locate a line,

/^D quickly locate the line beginning with D,

/Txt $quick positioning to a line ending in txt

Text editing (small amount)

Y copy. YY 3yy YGG YG (in behavioral units)

D delete DD 3dd DGG DG in behavioral units

P paste

X delete the character where the cursor is

D delete from cursor to end of line

U undo

^R redo undo, redo Ctrl + R

R modify a character

Enter other modes

A enter insert mode, insert after the cursor

I enter insert mode, insert in front of the cursor

O insert another line

A shift + a inserted at the end of the current line

: enter last line mode (extended command mode)

V enter visual mode

^V enter visual block mode Ctrl + V

V enters visual line mode

R enters the replace mode to perform batch replacement after the cursor, similar to inserting text on Windows

VIM keyword auto completion in insert mode Ctrl + P / n


The above is the Linux VIM practical command that Xiaobian introduced to you. I hope it can help you. If you have any questions, please leave a message to me, and Xiaobian will reply you in time. Thank you very much for your support of the developepaer website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!

Recommended Today

The use of progressbarcontrol, a progress bar control of devexpress – Taking ZedGraph as an example to add curve progress

scene WinForm control – devexpress18 download installation registration and use in vs: When using ZedGraph to add curves, the number of curves is slower if there are many cases. So in the process of adding curve, the progress needs to be displayed, and the effect is as follows     Note: Blog home page: […]