Vi Undo command, viundo command

Source: Internet
Author: User

Vi Undo command, viundo command

I. Overview

Vi Undo command: u and U. Here, u is the last command to undo, and U is to undo all operations of this row when the cursor is in the current row. (Derived from Learning the vi and Vim)

Ii. Example

Step 4: type the command U and roll back the text to step 3;

Step 11: Enter the command U, and the text is rolled back to step 10. Because this step does not have step_undo, step 12 typed the command u, and vi prompts Already at oldest change.

Step command step_undo context

0

1 I 0 abc

2x1 bc

3x2 c

4 U 3

5 u 2 c

6 u 1 bc

7 u 0 abc

8x7 bc

9 u 0 abc

10 u

11 U 10 c

12 u

Iii. Conclusion

In Learning the vi and Vim, U is defined as canceling all operations on the row when the cursor is in the current row. This definition is inaccurate.

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.