Vim vim cursor move copy and 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:

650) this.width=650; "title=" 1.png "style=" Float:none; "src=" https://s4.51cto.com/oss/201711/09/ B04f2753d1c4b828042763203ba8d374.png-wh_500x0-wm_3-wmp_4-s_232166381.png "alt=" B04f2753d1c4b828042763203ba8d374.png-wh_ "/>

Press V to select, and then press Y to copy

650) this.width=650; "title=" 2.png "style=" Float:none; "src=" https://s4.51cto.com/oss/201711/09/ 0b668c17b1489e693f72d98e96876f91.png-wh_500x0-wm_3-wmp_4-s_1939743842.png "alt=" 0b668c17b1489e693f72d98e96876f91.png-wh_ "/>

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

650) this.width=650; "title=" 3.png "style=" Float:none; "src=" https://s4.51cto.com/oss/201711/09/ 3baad90a2ae4cd486364c821e0dea381.png-wh_500x0-wm_3-wmp_4-s_3866138193.png "alt=" 3baad90a2ae4cd486364c821e0dea381.png-wh_ "/>

After pressing V, the move cursor is selected,

650) this.width=650; "title=" 4.png "style=" Float:none; "src=" https://s2.51cto.com/oss/201711/09/ Ca52208cb1babc6663d3eff527ef88e2.png-wh_500x0-wm_3-wmp_4-s_1985281879.png "alt=" Ca52208cb1babc6663d3eff527ef88e2.png-wh_ "/>

Then press D to cut

650) this.width=650; "title=" 5.png "style=" Float:none; "src=" https://s2.51cto.com/oss/201711/09/ 2271a9d3d58679b5a8d316a1d1f24c4f.png-wh_500x0-wm_3-wmp_4-s_1169253637.png "alt=" 2271a9d3d58679b5a8d316a1d1f24c4f.png-wh_ "/>

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.



This article is from the "cow dung also incense" blog, please be sure to keep this source http://ainfyx.blog.51cto.com/724466/1980482

Vim vim cursor move copy and 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.