VI basic operations (1)-Basic editing commands

Source: Internet
Author: User

Command mode

Or/or? Or no prefix. Press ESC to return to the command mode.

Text mode

Input text, press I to enter the input mode

 

Direction Control

Down from left H, J up K, right l

Insert

I insert before the current position

I insert before the current row

A is appended after the current position

A appended to the current row

O generate a new line after the current row

O generate a new line before the current row

Save : W
Exit : Q
Save and exit : WQ or ZZ
Force : Q! : WQ!
Jump First line 0

$ End of line

W. Next word

B. Previous word

E word ends

Delete X Delete the current character 5x Delete 5

Dd delete current row 5dd Delete 5 rows

Rollback Recent uundo operations

All uundo operations on the current row

Replacement R changes from the current position (input mode)

R replaces the current character (in command mode)

. (Point) Repeat the last command to change the text
Help : Help

: Help WQ query WQ help

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.