Linux vim Edit Command mode _linux Shell

Source: Internet
Author: User

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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.