Vim Text Editor

Source: Internet
Author: User

Insert Command

I

Insert before the cursor

I

Start insertion at the current line of the cursor

A

Insert after cursor

A

Inserts at the end of the current line of the cursor

O

Inserts a new row on the next line of the current line of the cursor

O

Inserts a new row on the previous line of the cursor's current row


position Command

: Set Nu

Show line Numbers

: Set Nonu

Cancel line number

Gg

To the first line of text

G

To the last line of text

: N

To the nth line of text

Replace and Cancel commands

U

Undo, cancel the previous action

Ctrl + R

Redo, before returning to undo

R

Replace the character at which the cursor is located

R

Start with the cursor, press the ESC key to end

Delete command

X

Delete the character at the cursor location

Nx

Delete n characters after cursor location

Dd

Delete the line where the cursor is located. NDD Delete N rows

Dg

Delete the line to the end of the cursor so the content

D

Delete the contents of the cursor at the end of the line

: 5,7d

Delete a specified range of rows

Common shortcut keys

shift+ ZZ

Save exit, same as ": Wq" function

V

Enter character Visual mode

V or Shift + V

Enter line visual mode

Ctrl + V

Enter block Visual mode

   

Vim Text 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.