VI (VIM) is a very popular editor on Linux, many Linux distributions are installed by default VI (VIM). VI (VIM) command a wide range but if used flexibly will greatly improve the efficiency. VI is "visual interface" abbreviation, VIM is VI improved (enhanced version of VI). In general system Management Maintenance VI is enough, if you want to use the code highlighting can use Vim. The following is the use of VI Tutorial: including VI of the basic introduction, use mode, File open close save, insert text or new lines, move the cursor, delete, restore characters or lines, search, etc., is a more suitable for beginners to learn VI tutorial.
VI has 3 modes: insert mode, command mode, low line mode.
Insert mode: You can enter characters in this mode, press ESC to return to command mode.
Command mode: You can move the cursor, delete characters, and so on.
Low-line mode: You can save files, exit VI, set VI, Look for functions (low line mode can also be seen as the command mode).
Yum Install-y vim-enhanced
Install VIM command
General mode
Shift 4 Line End
Shift 6 or 0 beginning
GG Top
G Lower
Copy yy
Cut a few lines of digital DD
P Paste
and? Find
1,100s/iptable/ip/g the first line to line 100 to replace iptable with IP g global
1, $s/iptable/ip/g all options
%s Entire Document replacement
: Nohl Remove Highlight
The above is a small set to introduce the Linux Vim Editor command mode, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!