Skip to content

Commit 0ee9ca6

Browse files
authored
Merge pull request #2370 from h-east/update-undo
Update undo.{txt,jax}
2 parents 147d811 + c3adef1 commit 0ee9ca6

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

doc/undo.jax

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*undo.txt* For Vim バージョン 9.1. Last change: 2024 Nov 09
1+
*undo.txt* For Vim バージョン 9.1. Last change: 2025 Oct 12
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -277,8 +277,8 @@ Note テキストプロパティは undo ファイルには保存されません
277277

278278
":wundo" と ":rundo" を使うことで undo 履歴の保存と復元を手動で実行することも
279279
できます。
280-
*:wundo* *:rundo*
281-
:wundo[!] {file}
280+
*:wu* *:wundo*
281+
:wu[ndo][!] {file}
282282
undo 履歴を {file} に保存する。
283283
{file} が存在し、それが undo ファイルでないなら (ファイル先頭
284284
のマジックナンバーが違うなら)、コマンドは失敗します。それでも
@@ -290,7 +290,8 @@ Note テキストプロパティは undo ファイルには保存されません
290290
制限のかかったディレクトリ内の undo ファイルは上書きできませ
291291
ん。
292292

293-
:rundo {file} {file} から undo 履歴を読み込む。
293+
*:rund* *:rundo*
294+
:rund[o] {file} {file} から undo 履歴を読み込む。
294295

295296
自動コマンドを使うことで undo ファイルの名前を明示的に指定することができます。
296297
例: >

en/undo.txt

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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

113113
Setting the value of 'undolevels' also closes the undo block. Even when the
114114
new 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
260260
detect if an undo file is no longer synchronized with the file it was written
261261
for (with a hash of the file contents) and ignore it when the file was changed
262262
after the undo file was written, to prevent corruption. An undo file is also
@@ -278,21 +278,22 @@ guaranteed.
278278

279279
You can also save and restore undo histories by using ":wundo" and ":rundo"
280280
respectively:
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

297298
You can use these in autocommands to explicitly specify the name of the
298299
history 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'
386387
and 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

393395
Marks for the buffer ('a to 'z) are also saved and restored, together with the
394396
text.

0 commit comments

Comments
 (0)