Vim Editor Common operations

Source: Internet
Author: User
Tags save file

Vim file Editor Common operations Summary:


Copy

YY Copy a row

10yy Copy from the current cursor line to the following 10 lines


Y1G Copy all data from the row to the first row of the cursor

YG copies all data from the row to the last row of the cursor



Paste

P (lowercase) paste to the next line in the row where the cursor is located

P (uppercase) Paste to the previous line of the cursor


Delete Row

DD Delete the line where the cursor is located

10DD Delete the line where the cursor is located to the following 10 lines


Delete character

X (lowercase) Deletes a character after the cursor position

X (uppercase) deletes a character in front of the cursor position


Merge rows

J (uppercase) merges the row where the current cursor is in the next line


Cursor Jump

GG jumps to the first line of the file position

G jump to the last line of the file


100G jumps to the beginning of line 100th

: 100 jump to the beginning of line 100th


^ Jump to beginning of line

$ jump to end of line


Flip Screen:

Ctrl+f Front Flip Screen

Ctrl+b Turn back the screen


Find

/"String to find", press "n" to find the next match character, press "n" to look up


Replace



Save File

: W


Save and exit

: Wq


Force exit

: q!




Vim Editor Common operations

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.