Skip to content

Commit f80bf17

Browse files
authored
Merge pull request #517 from vim-jp/update_eval
Update eval.{txt,jax}
2 parents 51c95b0 + 34955bb commit f80bf17

File tree

2 files changed

+46
-23
lines changed

2 files changed

+46
-23
lines changed

doc/eval.jax

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim バージョン 8.1. Last change: 2019 Apr 06
1+
*eval.txt* For Vim バージョン 8.1. Last change: 2019 Apr 21
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -1644,7 +1644,8 @@ v:count 最後に実行されたノーマルモードコマンドに渡され
16441644
"3d2w" のようにカウントが2個指定された場合、その数が掛けられる。
16451645
よって "d6w" となる。
16461646
オプション 'formatexpr' を評価するためにも使われる。
1647-
また "count" は、以前の版のVimとの互換性の為に動作する。
1647+
|scriptversion| が 3以降でなければ、"count" も、以前の版のVim
1648+
との互換性の為に動作する。
16481649

16491650
*v:count1* *count1-variable*
16501651
v:count1 "v:count" と同じだが、カウントが指定されなかった時の既定値が 1
@@ -1675,7 +1676,8 @@ v:errmsg 最後に表示されたエラーメッセージ。この変数は代
16751676
:next
16761677
:if (errmsg != "")
16771678
: ...
1678-
< また "errmsg" は、以前の版のVimとの互換性の為に動作する。
1679+
< |scriptversion| が 3以降でなければ、"errmsg" も、以前の版のVim
1680+
との互換性の為に動作する。
16791681

16801682
*v:errors* *errors-variable* *assert-return*
16811683
v:errors |assert_true()|のような、テスト用関数によって見つかったエラー。
@@ -1972,7 +1974,8 @@ v:shell_error 最後に実行したシェルコマンドの結果。シェルコ
19721974
:if v:shell_error
19731975
: echo 'could not rename "foo" to "bar"!'
19741976
:endif
1975-
< また "shell_error" は、以前の版のVimとの互換性の為に動作する。
1977+
< |scriptversion| が 3以降でなければ、"shell_error" も、以前の版
1978+
のVimとの互換性の為に動作する。
19761979

19771980
*v:statusmsg* *statusmsg-variable*
19781981
v:statusmsg 最後に表示されたステータスメッセージ。この変数は代入すること
@@ -2070,7 +2073,8 @@ v:this_session 最後にロードされたか、セーブされたセッショ
20702073
ファイル名。|:mksession|を参照。この変数は代入することが許さ
20712074
れている。それ以前にセーブされたセッションがなければ、この変数
20722075
は空となる。
2073-
また "this_session" は、以前の版のVimとの互換性の為に動作する。
2076+
|scriptversion| が 3以降でなければ、"this_session" も、以前の
2077+
版のVimとの互換性の為に動作する。
20742078

20752079
*v:throwpoint* *throwpoint-variable*
20762080
v:throwpoint 最も直近に捕捉されてまだ終了していない例外が発生した位置。キー
@@ -2099,8 +2103,8 @@ v:val 辞書|Dictionary|の現在の要素の値。|map()|と|filter()|で使
20992103
*v:version* *version-variable*
21002104
v:version Vimのバージョン番号。メジャーバージョン番号は100倍され、マイ
21012105
ナーバージョン番号と足されている。Version 5.0は500。Version
2102-
5.1 (5.01)は501となる。読出し専用。また "version" は、以前の版
2103-
のVimとの互換性の為に動作する
2106+
5.1 (5.01)は501となる。読出し専用。|scriptversion| が 3以降で
2107+
なければ、"version" も、以前の版のVimとの互換性の為に動作する
21042108
特定のパッチが適用されているかを調べるには|has()|を使う。例: >
21052109
if has("patch-7.4.123")
21062110
< Note 5.0と5.1には両方ともパッチ123が存在しているが、バージョン
@@ -2651,7 +2655,7 @@ term_setkill({buf}, {how}) なし 端末のジョブを停止するためのシ
26512655
term_setrestore({buf}, {command}) なし 端末を復元するためのコマンドを設定する
26522656
term_setsize({buf}, {rows}, {cols})
26532657
なし 端末のサイズを設定する
2654-
term_start({cmd}, {options}) 数値 端末ウィンドウを開きジョブを実行する
2658+
term_start({cmd} [, {options}]) 数値 端末ウィンドウを開きジョブを実行する
26552659
term_wait({buf} [, {time}]) 数値 スクリーンが更新されるのを待つ
26562660
test_alloc_fail({id}, {countdown}, {repeat})
26572661
なし メモリの確保を失敗にさせる
@@ -9181,6 +9185,7 @@ term_getcursor({buf}) *term_getcursor()*
91819185
"visible" カーソルが可視のときは 1、不可視のときは 0
91829186
"blink" カーソルが点滅のときは 1、非点滅のときは 0
91839187
"shape" ブロックカーソルは 1、下線は 2、垂直線は 3
9188+
"color" カーソルの色。例: "green"
91849189

91859190
{buf} は端末ウィンドウのバッファ番号でなければならない。バッ
91869191
ファが存在しない、もしくは端末ウィンドウでない場合は、空リスト
@@ -9349,7 +9354,7 @@ term_setsize({buf}, {rows}, {cols}) *term_setsize()* *E955*
93499354
端末ウィンドウでない場合は、空リストが返される。
93509355
{|+terminal| 機能付きでコンパイルされたときのみ有効}
93519356

9352-
term_start({cmd}, {options}) *term_start()*
9357+
term_start({cmd} [, {options}]) *term_start()*
93539358
端末ウィンドウを開き、その中で {cmd} を実行する。
93549359

93559360
{cmd} は |job_start()| と同じような文字列もしくはリストである。
@@ -10269,6 +10274,7 @@ vim_starting Vimの初期化プロセス中は真となる。|startup|
1026910274
viminfo viminfoをサポート
1027010275
vimscript-1 Vim scriptバージョン1 サポート
1027110276
vimscript-2 Vim scriptバージョン2 サポート
10277+
vimscript-3 Vim scriptバージョン3 サポート
1027210278
virtualedit オプション 'virtualedit' をサポート (常に true)
1027310279
visual ビジュアルモードをサポート (常に true)
1027410280
visualextra 拡張ビジュアルモードをサポート (常に true)
@@ -12321,7 +12327,7 @@ matchstr()やsubstitute()を使えば実現できる。以下の例は、"foobar
1232112327

1232212328
==============================================================================
1232312329
10. Vim scriptバージョン *vimscript-version* *vimscript-versions*
12324-
12330+
*scriptversion*
1232512331
時間が経つにつれて多くの機能がVim scriptに追加された。これにはExコマンド、関
1232612332
数、変数タイプなどが含まれる。それぞれの個々の機能は |has()| と |exists()|関数
1232712333
でチェックできる。
@@ -12341,9 +12347,15 @@ matchstr()やsubstitute()を使えば実現できる。以下の例は、"foobar
1234112347
< "." による文字列連結はサポートされていない、代わりに ".." を使用するこ
1234212348
と。これにより、Dictメンバーアクセスと浮動小数点数に "." を使用するこ
1234312349
とによる曖昧さが回避される。".5" は数値 0.5 を意味する。
12344-
以下でサポートを検査する: >
12345-
has('vimscript-2')
12350+
>
12351+
:scriptversion 3
12352+
< すべてのVimの定義済変数 |vim-variable| には "v:" という接頭辞を付けな
12353+
ければならない。例えば "version" は |v:version| とは違うので、普通の変
12354+
数として使うことができる。
12355+
"count" やその他のいくつかの分かり切った名前でも同様である。
1234612356

12357+
以下でサポートを検査する: >
12358+
has('vimscript-3')
1234712359

1234812360
==============================================================================
1234912361
11. +eval機能が無効 *no-eval-feature*

en/eval.txt

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.1. Last change: 2019 Apr 06
1+
*eval.txt* For Vim version 8.1. Last change: 2019 Apr 21
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1688,7 +1688,8 @@ v:count The count given for the last Normal mode command. Can be used
16881688
When there are two counts, as in "3d2w", they are multiplied,
16891689
just like what happens in the command, "d6w" for the example.
16901690
Also used for evaluating the 'formatexpr' option.
1691-
"count" also works, for backwards compatibility.
1691+
"count" also works, for backwards compatibility, unless
1692+
|scriptversion| is 3 or higher.
16921693

16931694
*v:count1* *count1-variable*
16941695
v:count1 Just like "v:count", but defaults to one when no count is
@@ -1720,7 +1721,8 @@ v:errmsg Last given error message. It's allowed to set this variable.
17201721
:silent! next
17211722
:if v:errmsg != ""
17221723
: ... handle error
1723-
< "errmsg" also works, for backwards compatibility.
1724+
< "errmsg" also works, for backwards compatibility, unless
1725+
|scriptversion| is 3 or higher.
17241726

17251727
*v:errors* *errors-variable* *assert-return*
17261728
v:errors Errors found by assert functions, such as |assert_true()|.
@@ -2023,7 +2025,8 @@ v:shell_error Result of the last shell command. When non-zero, the last
20232025
:if v:shell_error
20242026
: echo 'could not rename "foo" to "bar"!'
20252027
:endif
2026-
< "shell_error" also works, for backwards compatibility.
2028+
< "shell_error" also works, for backwards compatibility, unless
2029+
|scriptversion| is 3 or higher.
20272030

20282031
*v:statusmsg* *statusmsg-variable*
20292032
v:statusmsg Last given status message. It's allowed to set this variable.
@@ -2123,7 +2126,8 @@ v:testing Must be set before using `test_garbagecollect_now()`.
21232126
v:this_session Full filename of the last loaded or saved session file. See
21242127
|:mksession|. It is allowed to set this variable. When no
21252128
session file has been saved, this variable is empty.
2126-
"this_session" also works, for backwards compatibility.
2129+
"this_session" also works, for backwards compatibility, unless
2130+
|scriptversion| is 3 or higher
21272131

21282132
*v:throwpoint* *throwpoint-variable*
21292133
v:throwpoint The point where the exception most recently caught and not
@@ -2154,7 +2158,7 @@ v:val Value of the current item of a |List| or |Dictionary|. Only
21542158
v:version Version number of Vim: Major version number times 100 plus
21552159
minor version number. Version 5.0 is 500. Version 5.1 (5.01)
21562160
is 501. Read-only. "version" also works, for backwards
2157-
compatibility.
2161+
compatibility, unless |scriptversion| is 3 or higher.
21582162
Use |has()| to check if a certain patch was included, e.g.: >
21592163
if has("patch-7.4.123")
21602164
< Note that patch numbers are specific to the version, thus both
@@ -2675,7 +2679,7 @@ term_setkill({buf}, {how}) none set signal to stop job in terminal
26752679
term_setrestore({buf}, {command}) none set command to restore terminal
26762680
term_setsize({buf}, {rows}, {cols})
26772681
none set the size of a terminal
2678-
term_start({cmd}, {options}) Number open a terminal window and run a job
2682+
term_start({cmd} [, {options}]) Number open a terminal window and run a job
26792683
term_wait({buf} [, {time}]) Number wait for screen to be updated
26802684
test_alloc_fail({id}, {countdown}, {repeat})
26812685
none make memory allocation fail
@@ -9436,6 +9440,7 @@ term_getcursor({buf}) *term_getcursor()*
94369440
is not blinking.
94379441
"shape" 1 for a block cursor, 2 for underline and 3
94389442
for a vertical bar.
9443+
"color" color of the cursor, e.g. "green"
94399444

94409445
{buf} must be the buffer number of a terminal window. If the
94419446
buffer does not exist or is not a terminal window, an empty
@@ -9606,7 +9611,7 @@ term_setsize({buf}, {rows}, {cols}) *term_setsize()* *E955*
96069611
exist or is not a terminal window, an error is given.
96079612
{only available when compiled with the |+terminal| feature}
96089613

9609-
term_start({cmd}, {options}) *term_start()*
9614+
term_start({cmd} [, {options}]) *term_start()*
96109615
Open a terminal window and run {cmd} in it.
96119616

96129617
{cmd} can be a string or a List, like with |job_start()|. The
@@ -10555,6 +10560,7 @@ vim_starting True while initial source'ing takes place. |startup|
1055510560
viminfo Compiled with viminfo support.
1055610561
vimscript-1 Compiled Vim script version 1 support
1055710562
vimscript-2 Compiled Vim script version 2 support
10563+
vimscript-3 Compiled Vim script version 3 support
1055810564
virtualedit Compiled with 'virtualedit' option. (always true)
1055910565
visual Compiled with Visual mode. (always true)
1056010566
visualextra Compiled with extra Visual mode commands. (always
@@ -12692,7 +12698,7 @@ code can be used: >
1269212698
1269312699
==============================================================================
1269412700
10. Vim script versions *vimscript-version* *vimscript-versions*
12695-
12701+
*scriptversion*
1269612702
Over time many features have been added to Vim script. This includes Ex
1269712703
commands, functions, variable types, etc. Each individual feature can be
1269812704
checked with the |has()| and |exists()| functions.
@@ -12713,9 +12719,14 @@ instead of failing in mysterious ways. >
1271312719
< String concatenation with "." is not supported, use ".." instead.
1271412720
This avoids the ambiguity using "." for Dict member access and
1271512721
floating point numbers. Now ".5" means the number 0.5.
12716-
Test for support with: >
12717-
has('vimscript-2')
12722+
>
12723+
:scriptversion 3
12724+
< All |vim-variable|s must be prefixed by "v:". E.g. "version" doesn't
12725+
work as |v:version| anymore, it can be used as a normal variable.
12726+
Same for some obvious names as "count" and others.
1271812727

12728+
Test for support with: >
12729+
has('vimscript-3')
1271912730
1272012731
==============================================================================
1272112732
11. No +eval feature *no-eval-feature*

0 commit comments

Comments
 (0)