Vim practice manual (4) frequently used editing operation buttons

Source: Internet
Author: User
Tags uppercase letter

Reprinted please indicate this blog from "LIU Da csdn blog": http://blog.csdn.net/poechant

1. Delete)

Dd
Delete the row where the cursor is located

NDD
Delete n rows from the row where the cursor is located and down

D1g
Delete all rows from the row where the cursor is located to the first row

DG
Delete all rows from the row where the cursor is located to the last row

D $
Delete all characters from the cursor position to the end of the line

D0
Delete all characters from the cursor position to the beginning of the line

2. copy operation (Yank)

YY
Copy the row where the cursor is located

Nyy
Copy n rows down from the row where the cursor is located

Y1g
Copy all rows from the row where the cursor is located to the first row

YG
Copy all rows from the row where the cursor is located to the last row

Y $
Copy all characters from the cursor position to the end of the line

Y0
Copy all characters from the cursor position to the beginning of the line

3. paste (paste)

P
Lowercase letter P: paste the data in the clipboard, starting from the next row in the row where the cursor is located

P
Uppercase letter P: paste the data in the clipboard, starting from the last line of the row where the cursor is located

4. Undo and redo operations)

U
(UNDO) undo the previous operation

CTRL + R
(Redo) Redo the previous operation

5. Repeated operations

.
Repeat the previous operation

6. Replace)

R
Replace the character at the cursor

R
Enter the replacement mode until you Press ESC to exit

CC
Replace the row where the cursor is located

CW
Replace the English word of the cursor

~
Case sensitivity

7. Typographical operations

: Le <ft>
Left alignment of the row where the cursor is located

: RI <ght>
Right alignment of the row where the cursor is located

: Ce <nter>
Center the row where the cursor is located

Reprinted please indicate this blog from "LIU Da csdn blog": http://blog.csdn.net/poechant

-

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.