Vim Undo fallback operation

Source: Internet
Author: User

You can undo one operation by pressing u in VI

U undo the last step operation
Ctrl+r Redo the previous undo operation

Attention:
If you enter "U" two times and your text reverts to the original, it should be that your vim is configured in VI compatibility mode.
Redo
If you undo too much, you can enter Ctrl-r (redo) to rewind the previous command. In other words, it revokes a revocation. To see an example of execution, enter Ctrl-r two times. The character A and the spaces following it appear:
Young Intelligent Turtle
There is a special version of the Undo command: "U" (line undo). Line Undo Command undo all in previous edit line
On the operation. Enter these commands two times to cancel the previous "U":
A very intelligent Turtle
XXXX Delete very
A Intelligent Turtle
XXXXXX Delete Turtle
A Intelligent
Recover rows with "U"
A very intelligent Turtle
Undo "U" with "U"
A Intelligent
The "u" command itself changes itself, "u" command undo operation, Ctrl-r Command redo operation. It's a little messy, but no.
Worry, with "U" and ctrl-r command you can switch to any state.

Popular text editors often have forward and backward functions that move back and forth between locations that have been browsed in a file. Use Ctrl-o in Vim to perform the back, using Ctrl-i to perform the advance.
Related assistance:: Help Ctrl-o: Helping ctrl-i: Assist Jump-motions

Vim Undo fallback operation

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.