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

Configure Apache to support PHP in the Apache main configuration file httpd.conf Include custom profile in

In Apache’s main configuration file / conf/ http.conf Add at the bottom Include “D:workspace_phpapache-php.conf” The file path can be any In D: workspace_ Create under PHP file apache- php.conf file Its specific content is [html] view plain copy PHP-Module setup LoadFile “D:/xampp/php/php5ts.dll” LoadModule php5_module “D:/xampp/php/php5apache2_2.dll” <FilesMatch “.php$”> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch “.phps$”> SetHandler application/x-httpd-php-source </FilesMatch> […]