Vim Introduction Install copy cut paste

Source: Internet
Author: User

1. Vim

Generation: For Linux file editing, originally VI, and then for its function expansion, created VIM

Installation of Vim

Yum Install vim

2. Movement of the cursor

The most used is the direction key on the top and bottom around, and home, end key

And the HJKL on the letter keys.

H: Means forward

J: Indicates downward

K: Indicates upward

L: Indicates backward

W and E: The cursor moves backwards in the form of a single word

B: the cursor will move forward in the form of a single word.

GG : Press two lower case GG at the same time, the cursor will move to the first line

GG: At the same time press two to the big set GG, the cursor will move to the last line

Press the colon: then enter a number after the colon , and then enter, and the cursor will go to the beginning of the specified number of lines.

3.VIM Copy and paste

A. Copy the selected:

move the cursor to the text you want to select before or after, and then click the v key

Move the cursor again, if you want to copy it, click the Y key , if you want to cut, press the D key

Then, move the cursor to where you want to paste it, and press the P key.

Case:

Press v to select , and then press Y to copy

Move the cursor to the place you want to paste, press P

After pressing V, the move cursor is selected,

Then press D to cut

Then, move to the cursor to the place you want to paste press p

Above is a single copy or cut

Copy or cut in rows

1 line, is to move the cursor to the current line, and then, by yy is copied, press DD, is cut, and then move the cursor

To where you want to paste, press p

n rows, which is Nyy or NDD p

Here is the n line from the cursor down.

The above is Vim's mobile copy cut paste.

Vim Introduction Install copy cut paste

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.