The editing mode and command mode of VIM tool

Source: Internet
Author: User
First, enter the editing mode
1, according to large I positioning the beginning of the big line to edit
2. Press small I to edit by the line where the cursor is located
3, press big A from the end of the line to edit
4, press small A from the current character after editing
5. Press large o to insert a new line on the upstream of the current line
6. Press small o to insert a new row in the current line

Second, the command mode

/w look backwards from behind the cursor, press N to continue looking backwards, and vice versa Shift+n
W from the cursor backwards, press N to continue searching, and vice versa Shift+n
: 1,100s/will/riven/g (S-Replace, G-Global, do not G replaces only the first of each line) from line 1th to line 100, replace all would with riven
: 1, $s/will/riven/g replace all
: 1, $s #/etc/ethers#riven#g you want to replace the string with a/,
: wq! Force Save exit
: q! Force exit
: Set NU Displays the number of rows
: Set Nonu does not display the number of rows
: Nohl not highlighted
: X Save exit. (If the file does not change, it will not modify the file's Mtime)
: Wq Save exit changes the file's Mtime,

The editing mode and command mode of VIM tool

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.