1- *undo.txt* For Vim version 9.1. Last change: 2024 Nov 09
1+ *undo.txt* For Vim version 9.1. Last change: 2025 Oct 12
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -112,7 +112,7 @@ parts. E.g., for each sentence. |i_CTRL-G_u|
112112
113113Setting the value of 'undolevels' also closes the undo block. Even when the
114114new value is equal to the old value. Use `g: undolevels ` to explicitly read
115- and write only the global value of 'undolevels' . In | Vim9 | script: >
115+ and write only the global value of 'undolevels' . In | Vim9 | script: >
116116 &g:undolevels = &g:undolevels
117117 In legacy script: >
118118 let &g:undolevels = &g:undolevels
@@ -156,7 +156,7 @@ This is explained in the user manual: |usr_32.txt|.
156156 MM/DD HH:MM:SS idem, with month and day
157157 YYYY/MM/DD HH:MM:SS idem, with year
158158 The "saved" column specifies, if this change was
159- written to disk and which file write it was. This can
159+ written to disk and which file write it was. This can
160160 be used with the | :later | and | :earlier | commands.
161161 For more details use the | undotree() | function.
162162
@@ -256,7 +256,7 @@ for, you can use a BufWritePre autocommand: >
256256 au BufWritePre /tmp/* setlocal noundofile
257257
258258 Vim saves undo trees in a separate undo file, one for each edited file, using
259- a simple scheme that maps filesystem paths directly to undo files. Vim will
259+ a simple scheme that maps filesystem paths directly to undo files. Vim will
260260detect if an undo file is no longer synchronized with the file it was written
261261for (with a hash of the file contents) and ignore it when the file was changed
262262after the undo file was written, to prevent corruption. An undo file is also
@@ -278,21 +278,22 @@ guaranteed.
278278
279279You can also save and restore undo histories by using ":wundo" and ":rundo"
280280respectively:
281- *:wundo * *:rundo *
282- :wundo [!] {file}
281+ *:wu * *:wundo *
282+ :wu[ndo] [!] {file}
283283 Write undo history to {file} .
284284 When {file} exists and it does not look like an undo file
285285 (the magic number at the start of the file is wrong), then
286286 this fails, unless the ! was added.
287287 If it exists and does look like an undo file it is
288- overwritten. If there is no undo-history, nothing will be
288+ overwritten. If there is no undo-history, nothing will be
289289 written.
290290 Implementation detail: Overwriting happens by first deleting
291291 the existing file and then creating a new file with the same
292- name. So it is not possible to overwrite an existing undofile
292+ name. So it is not possible to overwrite an existing undofile
293293 in a write-protected directory.
294294
295- :rundo {file} Read undo history from {file} .
295+ *:rund* *:rundo*
296+ :rund[o] {file} Read undo history from {file} .
296297
297298You can use these in autocommands to explicitly specify the name of the
298299history file. E.g.: >
@@ -384,11 +385,12 @@ information you can use these commands: >
384385
385386 Note use of `&l: undolevels ` to explicitly read the local value of 'undolevels'
386387and the use of `:setlocal ` to change only the local option (which takes
387- precedence over the corresponding global option value). Saving the option value
388- via the use of `&undolevels ` is unpredictable; it reads either the local value
389- (if one has been set) or the global value (otherwise). Also, if a local value
390- has been set, changing the option via `:set undolevels` will change both the
391- global and local values, requiring extra work to save and restore both values.
388+ precedence over the corresponding global option value). Saving the option
389+ value via the use of `&undolevels ` is unpredictable; it reads either the local
390+ value (if one has been set) or the global value (otherwise). Also, if a local
391+ value has been set, changing the option via `:set undolevels` will change both
392+ the global and local values, requiring extra work to save and restore both
393+ values.
392394
393395Marks for the buffer ('a to 'z) are also saved and restored, together with the
394396text.
0 commit comments