VI Common commands

Source: Internet
Author: User

Move cursor

J   Move the cursor down a row

K   Move the cursor up a row

H   Move the cursor one character left

L   Move the cursor one character to the right

$   Move the cursor to the end of the row

0   Move cursor to the beginning of the line

+   Move cursor to the beginning of the downstream line

-   Move cursor to the beginning of the upstream line

Delete

Dd  Delete the entire row where the cursor is located

X   Delete the character at the cursor

X   Delete the character on the left of the cursor

5dd Delete 5 lines of text starting from the current row

Cancel operation

U    Cancel last modification

U   Cancel all modifications made to the current row

Copy and paste

YY  Copy the current row to the buffer

P   Paste the buffer text behind the cursor

Screen flip

CTRL + FOne screen forward

CTRL + B Flip back

Exit VI and save

Zz Exit save

: W Save and do not exit

: Q Exit

: Q! Exit and do not save

Search Text

/Text  Search down from the cursor

/      Repeat the previous search

: N     Move the cursor to the specified row

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.