From 06b39e485c36cbeb9da7a9cbcea785a0d9b7d8f1 Mon Sep 17 00:00:00 2001 From: Tsuyoshi CHO Date: Thu, 29 Apr 2021 19:19:28 +0900 Subject: [PATCH 1/6] usr_{02,04,12,41}.txt: Update Vim 8.2.2817 --- en/usr_02.txt | 2 +- en/usr_04.txt | 8 ++++---- en/usr_12.txt | 6 +++--- en/usr_41.txt | 26 ++++++++++++++++++-------- 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/en/usr_02.txt b/en/usr_02.txt index a866b7abb..53d6cb548 100644 --- a/en/usr_02.txt +++ b/en/usr_02.txt @@ -43,7 +43,7 @@ like: |~ | |"file.txt" [New file] | +---------------------------------------+ - ('#" is the cursor position.) + ('#' is the cursor position.) The tilde (~) lines indicate lines not in the file. In other words, when Vim runs out of file to display, it displays tilde lines. At the bottom of the diff --git a/en/usr_04.txt b/en/usr_04.txt index d2dc05609..ac629a598 100644 --- a/en/usr_04.txt +++ b/en/usr_04.txt @@ -1,4 +1,4 @@ -*usr_04.txt* For Vim version 8.2. Last change: 2019 Nov 21 +*usr_04.txt* For Vim version 8.2. Last change: 2021 Feb 22 VIM USER MANUAL - by Bram Moolenaar @@ -464,9 +464,9 @@ of characters to replace. It will not continue on the next line. You can switch between Insert mode and Replace mode with the key. -When you use (backspace) to make correction, you will notice that the -old text is put back. Thus it works like an undo command for the last typed -character. +When you use (backspace) to make a correction, you will notice that the +old text is put back. Thus it works like an undo command for the previously +typed character. ============================================================================== *04.10* Conclusion diff --git a/en/usr_12.txt b/en/usr_12.txt index f1af6be19..7781f8e38 100644 --- a/en/usr_12.txt +++ b/en/usr_12.txt @@ -1,4 +1,4 @@ -*usr_12.txt* For Vim version 8.2. Last change: 2017 Aug 11 +*usr_12.txt* For Vim version 8.2. Last change: 2021 Apr 19 VIM USER MANUAL - by Bram Moolenaar @@ -180,14 +180,14 @@ after it. That way you don't have this problem again. The |:global| command can be combined with the |:move| command to move all the lines before the first line, resulting in a reversed file. The command is: > - :global/^/m 0 + :global/^/move 0 Abbreviated: > :g/^/m 0 The "^" regular expression matches the beginning of the line (even if the line -is blank). The |:move| command moves the matching line to after the mythical +is blank). The |:move| command moves the matching line to after the imaginary zeroth line, so the current matching line becomes the first line of the file. As the |:global| command is not confused by the changing line numbering, |:global| proceeds to match all remaining lines of the file and puts each as diff --git a/en/usr_41.txt b/en/usr_41.txt index 8113bef8e..f34891a90 100644 --- a/en/usr_41.txt +++ b/en/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 8.2. Last change: 2021 Feb 01 +*usr_41.txt* For Vim version 8.2. Last change: 2021 Apr 19 VIM USER MANUAL - by Bram Moolenaar @@ -115,12 +115,20 @@ if you are impatient. FOUR KINDS OF NUMBERS -Numbers can be decimal, hexadecimal, octal or binary. A hexadecimal number -starts with "0x" or "0X". For example "0x1f" is decimal 31. An octal number -starts with a zero. "017" is decimal 15. A binary number starts with "0b" or -"0B". For example "0b101" is decimal 5. Careful: don't put a zero before a -decimal number, it will be interpreted as an octal number! - The ":echo" command always prints decimal numbers. Example: > +Numbers can be decimal, hexadecimal, octal or binary. + +A hexadecimal number starts with "0x" or "0X". For example "0x1f" is decimal +31. + +An octal number starts with "0o", "0O" or a zero and another digit. "0o17" is +decimal 15. Using just a zero prefix is not supported in Vim9 script. + +A binary number starts with "0b" or "0B". For example "0b101" is decimal 5. + +A decimal number is just digits. Careful: don't put a zero before a decimal +number, it will be interpreted as an octal number in legacy script! + +The ":echo" command always prints decimal numbers. Example: > :echo 0x7f 0o36 < 127 30 ~ @@ -611,7 +619,8 @@ String manipulation: *string-functions* stridx() first index of a short string in a long string strridx() last index of a short string in a long string strlen() length of a string in bytes - strchars() length of a string in characters + strcharlen() length of a string in characters + strchars() number of characters in a string strwidth() size of string when displayed strdisplaywidth() size of string when displayed, deals with tabs setcellwidths() set character cell width overrides @@ -1002,6 +1011,7 @@ Testing: *test-functions* assert_true() assert that an expression is true assert_exception() assert that a command throws an exception assert_beeps() assert that a command beeps + assert_nobeep() assert that a command does not cause a beep assert_fails() assert that a command fails assert_report() report a test failure test_alloc_fail() make memory allocation fail From 070d2492c1c563ebbcbe163a2f34b1a3674fcc4f Mon Sep 17 00:00:00 2001 From: Tsuyoshi CHO Date: Thu, 29 Apr 2021 19:37:03 +0900 Subject: [PATCH 2/6] usr_{02,04,12,41}.jax: Update Vim 8.2.2817 translate --- doc/usr_02.jax | 2 +- doc/usr_04.jax | 2 +- doc/usr_12.jax | 12 ++++++------ doc/usr_41.jax | 24 ++++++++++++++++-------- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/doc/usr_02.jax b/doc/usr_02.jax index 0d76d55e6..f7ce2106d 100644 --- a/doc/usr_02.jax +++ b/doc/usr_02.jax @@ -42,7 +42,7 @@ Vim が起動して file.txt という名前のファイルの編集が開始さ |~ | |"file.txt" [New file] | +---------------------------------------+ - ("#" はカーソルの位置です) + ('#' はカーソルの位置です) チルダ (~) の行は、ファイルにその行がないことを示しています。ファイルの末尾よ り後ろを表示する場合にチルダが表示されます。画面の下の方に、編集中のファイル名 diff --git a/doc/usr_04.jax b/doc/usr_04.jax index e654b8d13..f79177409 100644 --- a/doc/usr_04.jax +++ b/doc/usr_04.jax @@ -1,4 +1,4 @@ -*usr_04.txt* For Vim バージョン 8.2. Last change: 2019 Nov 21 +*usr_04.txt* For Vim バージョン 8.2. Last change: 2021 Feb 22 VIM USER MANUAL - by Bram Moolenaar diff --git a/doc/usr_12.jax b/doc/usr_12.jax index 60ae4e7d2..01f864a72 100644 --- a/doc/usr_12.jax +++ b/doc/usr_12.jax @@ -1,4 +1,4 @@ -*usr_12.txt* For Vim バージョン 8.2. Last change: 2017 Aug 11 +*usr_12.txt* For Vim バージョン 8.2. Last change: 2021 Apr 19 VIM USER MANUAL - by Bram Moolenaar @@ -184,17 +184,17 @@ Makefile ではよく、ファイルのリストが使われます。例: することで、行を逆順に並べ替えたファイルを作ることができます。コマンドは次の通 りです: > - :global/^/m 0 + :global/^/move 0 短縮して書くこともできます: > :g/^/m 0 "^" という正規表現は行の先頭に (それが空行であっても) マッチします。|:move| コ -マンドはマッチした行を 0 行目 (実際には存在しない仮想的な行) の下に移動します。 -つまり、マッチした行がファイルの先頭行になります。|:global| コマンドは行番号が -変更されても処理を継続できます。そして、マッチしたすべての行が、順番にファイル -の先頭に移動していきます。 +マンドはマッチした行を仮想的な 0 行目の下に移動します。つまり、マッチした行が +ファイルの先頭行になります。|:global| コマンドは行番号が変更されても処理を継続 +できます。そして、マッチしたすべての行が、順番にファイルの先頭に移動していきま +す。 ある一定の範囲だけ並べ替えることもできます。まず、並べ替えたい範囲の一行上に移 動し、"mt" でマークします。そして、範囲の末尾に移動し、次のように入力します: > diff --git a/doc/usr_41.jax b/doc/usr_41.jax index 3535a7715..c4d06a6f1 100644 --- a/doc/usr_41.jax +++ b/doc/usr_41.jax @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim バージョン 8.2. Last change: 2021 Feb 01 +*usr_41.txt* For Vim バージョン 8.2. Last change: 2021 Apr 19 VIM USER MANUAL - by Bram Moolenaar @@ -110,12 +110,18 @@ script の場合はちょっと違います。|usr_46.txt| を参照。 4種類の数値 ------------ -数値は10進数、16進数、8進数および2進数のいずれかで表記します。16進数は "0x" か -"0X" で開始します。例えば "0x1f" は10進数の 31 です。8進数は "0" で開始します。 -例えば "017" は10進数の 15 です。2進数は "0b" か "0B" で開始します。例えば -"0b101" は10進数の 5 です。注意: 10進数で書くときは先頭に "0" を付けないでく -ださい。8進数として扱われてしまいます。 - ":echo" コマンドは常に10進数で出力します。例: > +数値は10進数、16進数、8進数および2進数のいずれかで表記します。 + +16進数は "0x" か "0X" で開始します。例えば "0x1f" は10進数の 31 です。 + +8進数は "0" で開始します。例えば "017" は10進数の 15 です。 + +2進数は "0b" か "0B" で開始します。例えば "0b101" は10進数の 5 です。 + +10進数は数値そのままです。注意: 10進数で書くときは先頭に "0" を付けないでくだ +さい。旧来のスクリプトでは8進数として扱われてしまいます。 + +":echo" コマンドは常に10進数で出力します。例: > :echo 0x7f 0o36 < 127 30 ~ @@ -586,7 +592,8 @@ substitute() の呼び出しの前後にいろいろな処理を入れたりす stridx() 文字列の中で部分文字列が見つかった最初の位置 strridx() 文字列の中で部分文字列が見つかった最後の位置 strlen() 文字列のバイト単位での長さ - strchars() 文字列の文字単位での長さ + strcharlen() 文字列の文字単位での長さ + strchars() 文字列内の文字数 strwidth() 表示された文字列のサイズ strdisplaywidth() 表示された文字列のサイズ、タブを扱う setcellwidths() 文字の幅の上書き設定 @@ -982,6 +989,7 @@ Vimサーバー: *server-functions* assert_true() 式がtrueかどうかテストする assert_exception() コマンドが例外を投げる事をテストする assert_beeps() コマンドがビープ音を鳴らすことをテストする + assert_nobeep() コマンドがビープ音を鳴らさないことをテストする assert_fails() コマンドが失敗する事をテストする assert_report() テストの失敗をレポートする test_alloc_fail() メモリの確保を失敗させる From 370e9f824bd48a309cc973dd5d51d730f5b2a767 Mon Sep 17 00:00:00 2001 From: Tsuyoshi CHO Date: Tue, 4 May 2021 13:33:55 +0900 Subject: [PATCH 3/6] usr_02.txt: Update Vim 8.2.2831 --- en/usr_02.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/usr_02.txt b/en/usr_02.txt index 53d6cb548..be77da784 100644 --- a/en/usr_02.txt +++ b/en/usr_02.txt @@ -1,4 +1,4 @@ -*usr_02.txt* For Vim version 8.2. Last change: 2019 Nov 21 +*usr_02.txt* For Vim version 8.2. Last change: 2021 Apr 24 VIM USER MANUAL - by Bram Moolenaar @@ -532,7 +532,7 @@ Summary: *help-summary* > < for the corresponding flag of the 'cpoptions' settings, substitute by a specific flag, e.g.: > :help cpo-; -< And for the guioption flags: > +< And for the 'guioptions' flags: > :help go- 4) Normal mode commands do not have a prefix. To go to the help page for the From 3f1b8c04a23b6b18a9dc89613b7494f30a148fe6 Mon Sep 17 00:00:00 2001 From: Tsuyoshi CHO Date: Tue, 4 May 2021 13:35:22 +0900 Subject: [PATCH 4/6] usr_02.jax: Update Vim 8.2.2831 translate --- doc/usr_02.jax | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/usr_02.jax b/doc/usr_02.jax index f7ce2106d..e4efde523 100644 --- a/doc/usr_02.jax +++ b/doc/usr_02.jax @@ -1,4 +1,4 @@ -*usr_02.txt* For Vim バージョン 8.2. Last change: 2019 Nov 21 +*usr_02.txt* For Vim バージョン 8.2. Last change: 2021 Apr 24 VIM USER MANUAL - by Bram Moolenaar @@ -523,7 +523,7 @@ Vim にはオプションがたくさんあり、それを設定することで < は設定 'cpoptions' のフラグに対応します。 は個別のフラグに置き換えて 下さい。例: > :help cpo-; -< さらに guioption のフラグであれば: > +< さらに 'guioptions' のフラグであれば: > :help go- 4) ノーマルモードのコマンドにはプリフィックスはありません。"gt" コマンドのヘル From a0d80f24e9748c6deee1a830af6d520d70509071 Mon Sep 17 00:00:00 2001 From: Tsuyoshi CHO Date: Wed, 5 May 2021 08:38:34 +0900 Subject: [PATCH 5/6] usr_41.jax: fix octal description --- doc/usr_41.jax | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/usr_41.jax b/doc/usr_41.jax index c4d06a6f1..3f3628a0e 100644 --- a/doc/usr_41.jax +++ b/doc/usr_41.jax @@ -114,12 +114,13 @@ script の場合はちょっと違います。|usr_46.txt| を参照。 16進数は "0x" か "0X" で開始します。例えば "0x1f" は10進数の 31 です。 -8進数は "0" で開始します。例えば "017" は10進数の 15 です。 +8進数は "0o" か "0O" あるいは0とつづく他の数値で開始します。例えば "0o17" は10 +進数の 15 です。Vim9 script では前置詞が0だけの利用はサポートされません。 2進数は "0b" か "0B" で開始します。例えば "0b101" は10進数の 5 です。 10進数は数値そのままです。注意: 10進数で書くときは先頭に "0" を付けないでくだ -さい。旧来のスクリプトでは8進数として扱われてしまいます。 +さい。旧来のスクリプトでは8進数として扱われてしまいます! ":echo" コマンドは常に10進数で出力します。例: > From fecff9aa56def8dc23bf7bcfb6b82d4fc83fa81e Mon Sep 17 00:00:00 2001 From: Tsuyoshi CHO Date: Wed, 5 May 2021 19:59:22 +0900 Subject: [PATCH 6/6] usr_41.jax: enclose zero with quote Co-authored-by: h_east --- doc/usr_41.jax | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/usr_41.jax b/doc/usr_41.jax index 3f3628a0e..42be45030 100644 --- a/doc/usr_41.jax +++ b/doc/usr_41.jax @@ -114,8 +114,9 @@ script の場合はちょっと違います。|usr_46.txt| を参照。 16進数は "0x" か "0X" で開始します。例えば "0x1f" は10進数の 31 です。 -8進数は "0o" か "0O" あるいは0とつづく他の数値で開始します。例えば "0o17" は10 -進数の 15 です。Vim9 script では前置詞が0だけの利用はサポートされません。 +8進数は "0o" か "0O" あるいは "0" とつづく他の数値で開始します。例えば "0o17" +は10進数の 15 です。Vim9 script では前置詞が "0" だけの利用はサポートされませ +ん。 2進数は "0b" か "0B" で開始します。例えば "0b101" は10進数の 5 です。