Three years of ice-drinking-ai-linux-04 vim editor

Source: Internet
Author: User

Three modes of VIM: Command line mode, edit mode, extended mode

1: Common operations in command line mode

Delete

A): DD deletes the cursor as it moves forward

b): NDD delete n rows after the current line of the cursor

Copy

c): YY copy cursor where you are moving forward

d): Nyy The N rows after the current line where the cursor is copied

Paste

e): P Paste the next line of the cursor

f): NP paste content multiple times

Shear

g): DDP First Delete, then paste

Revocation and anti-revocation

h): U Undo

i): ctrl+r anti-revocation

Move the cursor quickly

J): GG Navigates to the first line of the file

k): NG navigates to a line of the file

k): GG navigates to the last line of the file

L): H navigates to the first line of the screen

m): M positioned in the middle of the screen

N): L Navigate to the last line of the screen

O): 0/home navigates to the beginning of the current line

P): $/end the end of the line to the current line

Extended mode (note in English: number)

Q):: Set nu display line number

R):: Q exit

s):: W Save

Edit mode
T): A enters insert mode and is added after the cursor.
u): I enters insert mode and inserts before the cursor.
V): O enters Insert mode and opens a new line below the current (cursor) row.

Three years of ice-drinking-ai-linux-04 vim editor

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.