*undo.txt* For Vim version 6.2. Last change: 2002.7.30
Vim REFERENCE MANUAL: Bram Moolenaar
(Translator: jwdu <[email protected]> http://vimcdoc.sf.net)
Undo and restore *undo-redo*
In the user manual |02.5The sections explain their basic operations.
1. Command to undo and resume operations |undo-commands|
2. Two ways to undo the operation |undo-two-ways|
3. Undo action comments |undo-remarks|
1. Command to undo and resume operations *undo-commands*<Undo>Or *undo* *<Undo>* *u* u revoke[count]Minor changes.{Vi: only one level}*:u* *:un* *:undo* :u[ndo] Undoes a change.{Vi: only one level}*CTRL-R*CTRL-RRecovery[count]There are no completed changes.{Vi: Refresh screen}*:red* *:redo* *redo* :red[o] Resumes an unfinished change.{Vi: no redo}*U* U Undo a series of recent changes made to a particular row.{Vi: while not moved off of it}Since the changes made recently are remembered, you can apply the undo and restore commands above to restore the files. Go to the previous state of the changes you made. Of course, you can also reapply these changes to restore the file to execution recovery. The previous state of the complex operation. Treating the "U" command is the same as treating the undo/redo command. So, the "u" command is revoked. a "U" command, 'CTRL-RThe command cancels the "U" command again. When "U", "u" and 'CTRL-R'Three lives When mixed, you will notice that the "U" command is determined to restore the file to the state it was in prior to the earlier "U" command. This may confuse you, but please try to get used to it. The "U" command always marks the buffer as changing state. When the "U" command restores the changed buffer to no change. In the state, it also considers the buffer to be in a changed state. At this point, use the "u" command to undo the changes until buffered. The status becomes unchanged.
2. Two ways to undo the operation *undo-two-ways* The way undo and resume works depends on the flag of the 'u' state in 'cpoptions'. Here is Vim (not included 'u' command) and vi-compatible (including the 'u' command) work in two modes. In the state of Vim, The "uu" command revokes two changes. In vi-compatible mode, the "uu" command does nothing (revocation of one undo). Vim working method without 'u': You can return to the previous state with a revocation command in time. At that time, you can also go forward again by using the recovery command. Such as If you make a new change after undoing the command, then the restore command will do nothing. Vi-compatible working method with 'u': The undo command revokes any changes including the previous undo command. The restore command repeats the previous undo command. but It does not repeat a changed command, if you want to do so, use the "." command.Example Vim mode Vi-compatible mode"uu" twice undo empty operation "uCTRL-R"No operation" Principle: Nvi uses the "." command instead ofCTRL-R. Unfortunately, this is not Vi compatible. E.g The "dwdwu." command deletes two words in Vi, but in Nvi, it does nothing.
3. Undo the comment of the operation *undo-remarks* The number of changes is placed in the 'undolevels' option. If its value is zero, the Vi-compatible method is applicable. Such as If its value is negative, any revocation is impossible. Use this when your memory is tight. Buffered flags ('a to 'z) are often saved and restored along with the file.{Vi is a little different when doing this}When all changes are revoked, the buffered flag is considered unchanged. At this point, exiting Vim is using ":q" Instead of ":q!".{Not in Vi}Note that this is relative to the last write of the file. And the comparison being written Writing "u" after writing ":w" actually changes the state of the buffer, so at this time, the state of the buffer is considered to be changed. When the manual |folding| When used, the fold will not be saved and restored. Only changes that are completely inside the fold are Save because the first and last rows of the fold are not changed. Limited registers can also be used to undo deletes. Every time you delete a file, the register is placed "1. Therefore, send The contents of the memory will change from "1." to "2", and so on. But "9 will be lost, now, you can pass the command '"1P' gets most recently deleted files. (Again, if the deleted content is last deleted or copied , then 'P' or 'p' can also get the results you want, because they both copy the contents of the unnamed registers ). With '"3P' you can get the first three deleted texts. *redo-register* If you want more content than a part of the deleted file, you can reuse the "." such a special command. . This will increase the number in the register used. So, if you use ""1P" first, then the next "." means '"2P. Repeating this will cause all numbered registers to be inserted. For example: If you delete the content with 'dd....', use '"1P....' to recover. If you don't know which register the deleted content is in, you can use the :display command. An alternative party The method is to try '"1P' in the first register, if it's not what you're looking for with the 'u.' command. This will remove the first Subsequent content, then repeat the above command in the second register. Reuse 'u.' until you get the one you want Rong. vim:tw=78:ts=8:ft=help:norl:
If the file you want to undo all changes from a file after the last update you need to select the file, right-click the shortcut menu, and then select TortoiseSVN → Revert command will display a ...
2019 Unicorn Enterprises heavily recruiting engineers Python standard >>> In the storage system, redo logs can deal with those transactions have been performed successfully not reflected in t...
If you miss a few files did not add, or submit the information was wrong, you can also use this command to undo. Has canceled the temporary file. Undo file has been modified, so that files are restore...
...
Undoing changes to the workspace In fact, it is to revoke the content that has been modified but has not been added or committed, and restore to the last add or commit Temporary area revocation Restor...
Undo and redo were encountered when doing a written test. Recently, when redux was used to reconstruct todos, it appeared again. Let's write it. Building undo and redo functions in the application is ...
Unity's Undo undo operation can also be customized. When we add our own operations to the Undo event, then we can undo the operation in our own way. directory Simple test of Undo operation Undo operat...
What is UNDO? The Oracle database creates and manages information that is used to roll back, undo, and change the database. This information is mainly composed of records of transaction behavior befor...
5.6 Previous Mysql's UDNO is placed in IBDATA, and you can set the parameters of undo after 5.6 to specify undo storage. InnoDB_undo_tablespaces This parameter controls the number of undo tablespaces,...