Vim copy and paste multiline text

Source: Internet
Author: User

Method 1:
Place the cursor in Row 3,
Input: 2yy
Place the cursor in Row 3,
Input: P
This method is suitable for copying a small number of lines of text. Copy two rows of data under 6th rows (inclusive) and put them under 9th rows.
Method 2:
Input in Command Line Mode
6, 9 co 12
Copy the content between 6th rows and 9th rows to the end of 12th rows.
Method 3:
You can use tags to replace the number of rows that you do not want to read or copy a large number of rows.
Move the cursor to the starting line and enter Ma
Move the cursor to the end line and enter MB
Move cursor to paste line, input MC
Then: 'a, 'B co' C. Change Co to m and cut it.
To delete multiple rows, you can use: 5, 9 de

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.