Linux under VI Editor paste copy cut function

Source: Internet
Author: User

RedHat 9.0 Linux under the VI Editor for simple paste copy cutting function ":

If you want to paste the third line in the file into line 15th:

1. Enter your file (in command mode, not edit mode)

2. Move your cursor to the beginning of your third line (with the arrow keys)

3, press V, (you find switching to Visual mode), press the arrow keys, know what you want to select

4. Press Y, and then move the cursor to the end of line 14th.

5. Press P. Complete

This method can be used for multiple lines of paste-and-copy

If you want to cut and copy, it's easier (only for a single line)

1. Enter your file (in command mode, not edit mode)

2. Move your cursor to the beginning of your third line (with the arrow keys)

3. Double-click D (Find the third line is missing)

4, then move the cursor to the end of Line 14th, press p.

Under the GUI: you can press I into the insertion mode, using the mouse to drag the reverse selection to paste the content, move the cursor to the place to paste, press the middle mouse button (two-button mouse can press the left and right key).

Under the plain text terminal:
Select a text block, using the V
Copy the selected block to the buffer, using Y
Copy entire line, with YY
Open the second file in the same edit window with: SP [filename]
Switch between multiple edit files, using ^WW
Shear block, with D
Cut the entire row with DD
Paste the contents of the buffer, using the P
The command preceded by a number indicating the number of repetitions, plus the letter indicating the name of the buffer used.
To get help, by using: helps [content or commands]

Linux under VI Editor paste copy cut function

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.