Skip to content

Update usr_{02,04,12,41}.{txt,jax} #908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/usr_02.jax
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -42,7 +42,7 @@ Vim が起動して file.txt という名前のファイルの編集が開始さ
|~ |
|"file.txt" [New file] |
+---------------------------------------+
("#" はカーソルの位置です)
('#' はカーソルの位置です)

チルダ (~) の行は、ファイルにその行がないことを示しています。ファイルの末尾よ
り後ろを表示する場合にチルダが表示されます。画面の下の方に、編集中のファイル名
Expand Down Expand Up @@ -523,7 +523,7 @@ Vim にはオプションがたくさんあり、それを設定することで
< は設定 'cpoptions' のフラグに対応します。<letter> は個別のフラグに置き換えて
下さい。例: >
:help cpo-;
< さらに guioption のフラグであれば: >
< さらに 'guioptions' のフラグであれば: >
:help go-<letter>

4) ノーマルモードのコマンドにはプリフィックスはありません。"gt" コマンドのヘル
Expand Down
2 changes: 1 addition & 1 deletion doc/usr_04.jax
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 6 additions & 6 deletions doc/usr_12.jax
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -184,17 +184,17 @@ Makefile ではよく、ファイルのリストが使われます。例:
することで、行を逆順に並べ替えたファイルを作ることができます。コマンドは次の通
りです: >

:global/^/m 0
:global/^/move 0

短縮して書くこともできます: >

:g/^/m 0

"^" という正規表現は行の先頭に (それが空行であっても) マッチします。|:move| コ
マンドはマッチした行を 0 行目 (実際には存在しない仮想的な行) の下に移動します。
つまり、マッチした行がファイルの先頭行になります。|:global| コマンドは行番号が
変更されても処理を継続できます。そして、マッチしたすべての行が、順番にファイル
の先頭に移動していきます
マンドはマッチした行を仮想的な 0 行目の下に移動します。つまり、マッチした行が
ファイルの先頭行になります。|:global| コマンドは行番号が変更されても処理を継続
できます。そして、マッチしたすべての行が、順番にファイルの先頭に移動していきま

ある一定の範囲だけ並べ替えることもできます。まず、並べ替えたい範囲の一行上に移
動し、"mt" でマークします。そして、範囲の末尾に移動し、次のように入力します: >
Expand Down
26 changes: 18 additions & 8 deletions doc/usr_41.jax
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -110,12 +110,20 @@ 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進数は "0o" か "0O" あるいは "0" とつづく他の数値で開始します。例えば "0o17"
は10進数の 15 です。Vim9 script では前置詞が "0" だけの利用はサポートされませ
ん。

2進数は "0b" か "0B" で開始します。例えば "0b101" は10進数の 5 です。

10進数は数値そのままです。注意: 10進数で書くときは先頭に "0" を付けないでくだ
さい。旧来のスクリプトでは8進数として扱われてしまいます!

":echo" コマンドは常に10進数で出力します。例: >

:echo 0x7f 0o36
< 127 30 ~
Expand Down Expand Up @@ -586,7 +594,8 @@ substitute() の呼び出しの前後にいろいろな処理を入れたりす
stridx() 文字列の中で部分文字列が見つかった最初の位置
strridx() 文字列の中で部分文字列が見つかった最後の位置
strlen() 文字列のバイト単位での長さ
strchars() 文字列の文字単位での長さ
strcharlen() 文字列の文字単位での長さ
strchars() 文字列内の文字数
strwidth() 表示された文字列のサイズ
strdisplaywidth() 表示された文字列のサイズ、タブを扱う
setcellwidths() 文字の幅の上書き設定
Expand Down Expand Up @@ -982,6 +991,7 @@ Vimサーバー: *server-functions*
assert_true() 式がtrueかどうかテストする
assert_exception() コマンドが例外を投げる事をテストする
assert_beeps() コマンドがビープ音を鳴らすことをテストする
assert_nobeep() コマンドがビープ音を鳴らさないことをテストする
assert_fails() コマンドが失敗する事をテストする
assert_report() テストの失敗をレポートする
test_alloc_fail() メモリの確保を失敗させる
Expand Down
6 changes: 3 additions & 3 deletions en/usr_02.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -532,7 +532,7 @@ Summary: *help-summary* >
< for the corresponding flag of the 'cpoptions' settings, substitute <letter>
by a specific flag, e.g.: >
:help cpo-;
< And for the guioption flags: >
< And for the 'guioptions' flags: >
:help go-<letter>

4) Normal mode commands do not have a prefix. To go to the help page for the
Expand Down
8 changes: 4 additions & 4 deletions en/usr_04.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 <Insert> key.

When you use <BS> (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 <BS> (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
Expand Down
6 changes: 3 additions & 3 deletions en/usr_12.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down
26 changes: 18 additions & 8 deletions en/usr_41.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 ~
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down