Mercurial > vim
comparison runtime/doc/undo.txt @ 23164:99ef85ff1af4
Update runtime files.
Commit: https://github.com/vim/vim/commit/1b884a0053982335f644eec6c71027706bf3c522
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 10 21:11:27 2020 +0100
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 10 Dec 2020 21:15:05 +0100 |
parents | 5b7ea82bc18f |
children | d19b7aee1925 |
comparison
equal
deleted
inserted
replaced
23163:ab4a692918ec | 23164:99ef85ff1af4 |
---|---|
1 *undo.txt* For Vim version 8.2. Last change: 2020 Oct 18 | 1 *undo.txt* For Vim version 8.2. Last change: 2020 Nov 30 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
63 You can go back in time with the undo command. You can then go forward again | 63 You can go back in time with the undo command. You can then go forward again |
64 with the redo command. If you make a new change after the undo command, | 64 with the redo command. If you make a new change after the undo command, |
65 the redo will not be possible anymore. | 65 the redo will not be possible anymore. |
66 | 66 |
67 'u' included, the Vi-compatible way: | 67 'u' included, the Vi-compatible way: |
68 The undo command undoes the previous change, and also the previous undo command. | 68 The undo command undoes the previous change, and also the previous undo |
69 The redo command repeats the previous undo command. It does NOT repeat a | 69 command. The redo command repeats the previous undo command. It does NOT |
70 change command, use "." for that. | 70 repeat a change command, use "." for that. |
71 | 71 |
72 Examples Vim way Vi-compatible way ~ | 72 Examples Vim way Vi-compatible way ~ |
73 "uu" two times undo no-op | 73 "uu" two times undo no-op |
74 "u CTRL-R" no-op two times undo | 74 "u CTRL-R" no-op two times undo |
75 | 75 |
101 This doesn't work by itself, because the next key press will start a new | 101 This doesn't work by itself, because the next key press will start a new |
102 change again. But you can do something like this: > | 102 change again. But you can do something like this: > |
103 | 103 |
104 :undojoin | delete | 104 :undojoin | delete |
105 | 105 |
106 After this an "u" command will undo the delete command and the previous | 106 After this a "u" command will undo the delete command and the previous |
107 change. | 107 change. |
108 | 108 |
109 To do the opposite, break a change into two undo blocks, in Insert mode use | 109 To do the opposite, break a change into two undo blocks, in Insert mode use |
110 CTRL-G u. This is useful if you want an insert command to be undoable in | 110 CTRL-G u. This is useful if you want an insert command to be undoable in |
111 parts. E.g., for each sentence. |i_CTRL-G_u| | 111 parts. E.g., for each sentence. |i_CTRL-G_u| |