Skip to content

Commit 9bc886e

Browse files
authored
Merge pull request #607 from vim-jp/update_eval
Update eval.{txt,jax}
2 parents 4c50ce5 + 8db1237 commit 9bc886e

File tree

2 files changed

+94
-37
lines changed

2 files changed

+94
-37
lines changed

doc/eval.jax

Lines changed: 47 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim バージョン 8.1. Last change: 2019 Jun 10
1+
*eval.txt* For Vim バージョン 8.1. Last change: 2019 Jun 17
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -1891,11 +1891,29 @@ v:option_new オプションに設定された新しい値。自動コマン
18911891
行している間のみ有効。
18921892
*v:option_old*
18931893
v:option_old オプションの以前の値。自動コマンド |OptionSet| を実行している
1894-
間のみ有効。
1894+
間のみ有効。設定に使用されたコマンドおよびオプションの種類に
1895+
よって、ローカルの以前の値またはグローバルの以前の値のどちらか
1896+
になる。
1897+
*v:option_oldlocal*
1898+
v:option_oldlocal
1899+
オプションの以前のローカル値。|OptionSet| 自動コマンドの実行中
1900+
に有効である。
1901+
*v:option_oldglobal*
1902+
v:option_oldglobal
1903+
オプションの以前のグローバル値。|OptionSet| 自動コマンドの実行
1904+
中に有効である。
18951905
*v:option_type*
18961906
v:option_type set コマンドのスコープ。自動コマンド |OptionSet| を実行している
18971907
間のみ有効。"global" もしくは "local" のどちらかとなる。
1898-
1908+
*v:option_command*
1909+
v:option_command
1910+
オプションを設定するために使われたコマンド。|OptionSet| 自動コ
1911+
マンドの実行中に有効である。
1912+
値 オプションは以下によって設定された ~
1913+
"setlocal" |:setlocal| または ":let l:xxx"
1914+
"setglobal" |:setglobal| または ":let g:xxx"
1915+
"set" |:set| または |:let|
1916+
"modeline" |modeline|
18991917
*v:operator* *operator-variable*
19001918
v:operator ノーマルモードにおいて最後に実行したオペレータコマンド。基本的
19011919
に1文字である。例外は <g> や <z> で始まるコマンドで、その場合
@@ -2110,18 +2128,18 @@ v:val リスト|List|もしくは辞書|Dictionary|の現在の要素の値。|
21102128
*v:version* *version-variable*
21112129
v:version Vimのバージョン番号。メジャーバージョン番号は100倍され、マイ
21122130
ナーバージョン番号と足されている。Version 5.0は500。Version
2113-
5.1 (5.01)は501となる。読出し専用。|scriptversion| が 3以降で
2114-
なければ、"version" も、以前の版のVimとの互換性の為に動作する。
2131+
5.1は501となる。読出し専用。|scriptversion| が 3以降でなけれ
2132+
、"version" も、以前の版のVimとの互換性の為に動作する。
21152133
特定のパッチが適用されているかを調べるには|has()|を使う。例: >
21162134
if has("patch-7.4.123")
21172135
< Note 5.0と5.1には両方ともパッチ123が存在しているが、バージョン
21182136
が違えば番号は同じでもパッチの内容は全く異なっている。
21192137

21202138
*v:versionlong* *versionlong-variable*
2121-
v:versionlong v:versionと同じだが、パッチレベルも含む。パッチ 1234 を適用し
2122-
たバージョン 8.1 の値は 8011234 である。これは次のように使用で
2123-
きる: >
2124-
if v:versionlong >= 8011234
2139+
v:versionlong v:versionと同じだが、最後の4桁にパッチレベルも含む。パッチ 123
2140+
を適用したバージョン 8.1 の値は 8010123 である。これは次のよう
2141+
に使用できる: >
2142+
if v:versionlong >= 8010123
21252143
< ただし、含まれているパッチのリストに隙間がある場合は、うまくい
21262144
かない。これは、最近のパッチが古いバージョンに含まれていた場合
21272145
に起こる。例えば、セキュリティ修正のため。
@@ -7889,10 +7907,9 @@ setbufline({expr}, {lnum}, {text}) *setbufline()*
78897907

78907908
{lnum} は |setline()| と同様に扱われる。
78917909
これは特定のバッファに対し、|setline()| のように機能する。
7892-
成功時には 0 が返され、失敗時には 1 が返される。
78937910

7894-
{expr} が有効なバッファでない、もしくは {lnum} が有効でない場
7895-
合、エラーメッセージが与えられる
7911+
{expr} が有効なバッファでないか、{lnum} が無効な場合は 1 が返
7912+
される。成功すると 0 が返される
78967913

78977914
setbufvar({expr}, {varname}, {val}) *setbufvar()*
78987915
バッファ{expr}のオプションまたはローカル変数{varname}に{val}を
@@ -8635,8 +8652,11 @@ sound_playevent({name} [, {callback}])
86358652
Ubuntuでは、それらは /usr/share/sounds/freedesktop/stereo に見
86368653
つかるだろう。例: >
86378654
call sound_playevent('bell')
8655+
< MS-Windows では、{name} は SystemAsterisk、SystemDefault、
8656+
SystemExclamation、SystemExit、SystemHand、SystemQuestion、
8657+
SystemStart、SystemWelcome 等になる。
86388658

8639-
< {callback} が指定されている場合は、サウンドが終了したときに呼
8659+
{callback} が指定されている場合は、サウンドが終了したときに呼
86408660
び出される。最初の引数はサウンドID、2番目の引数はステータスで
86418661
ある:
86428662
0 最後までサウンドが再生された
@@ -8648,7 +8668,9 @@ sound_playevent({name} [, {callback}])
86488668
endfunc
86498669
call sound_playevent('bell', 'Callback')
86508670

8651-
< `sound_stop()` に渡すことができるサウンドIDを返す。
8671+
< MS-Windows: {callback} はこの関数では動作しない。
8672+
8673+
`sound_stop()` に渡すことができるサウンドIDを返す。
86528674
サウンドを再生できなかった場合はゼロを返す。
86538675
{|+sound| 機能つきでコンパイルされたときのみ有効}
86548676

@@ -8666,6 +8688,11 @@ sound_stop({id}) *sound_stop()*
86668688
サウンド {id} の再生を停止する。{id} は、事前に
86678689
`sound_playevent()` または `sound_playfile()` によって返された
86688690
ものでなければならない。
8691+
8692+
MS-Windowsでは、これは `sound_playevent()` によって開始される
8693+
イベントサウンドに対しては機能しない。イベントのサウンドを止め
8694+
るには `sound_clear()` を使用する。
8695+
86698696
{|+sound| 機能つきでコンパイルされたときのみ有効}
86708697

86718698
*soundfold()*
@@ -11250,7 +11277,6 @@ text...
1125011277
# 数値
1125111278
* Funcref
1125211279

11253-
1125411280
:unl[et][!] {name} ... *:unlet* *:unl* *E108* *E795*
1125511281
内部変数{name}を削除する。複数の変数名を指定すると、そ
1125611282
れらが全て削除される。名前はリスト|List|や辞書
@@ -11277,10 +11303,9 @@ text...
1127711303
システムが環境変数の削除をサポートしていない場合は空に
1127811304
する。
1127911305

11280-
*:cons* *:const* *E996*
11306+
*:cons* *:const*
1128111307
:cons[t] {var-name} = {expr1}
1128211308
:cons[t] [{name1}, {name2}, ...] = {expr1}
11283-
:cons[t] [{name1}, {name2}, ...] .= {expr1}
1128411309
:cons[t] [{name}, ..., ; {lastname}] = {expr1}
1128511310
:cons[t] {var-name} =<< [trim] {marker}
1128611311
text...
@@ -11297,10 +11322,13 @@ text...
1129711322
< これは、変数が変更されないことを確実にしたいときに便利
1129811323
である。
1129911324
*E995*
11300-
|:const|は変数の変更をすることができない >
11325+
|:const|は変数の変更をすることができない: >
1130111326
:let x = 1
1130211327
:const x = 2 " エラー!
11303-
<
11328+
< *E996*
11329+
Note 環境変数、オプション値およびレジスタ値はロックで
11330+
きないため、ここでは使用できない。
11331+
1130411332
:lockv[ar][!] [depth] {name} ... *:lockvar* *:lockv*
1130511333
内部変数{name}をロックする。ロックすると、それ以降変更
1130611334
ができなくなる(アンロックするまで)。

en/eval.txt

Lines changed: 47 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.1. Last change: 2019 Jun 10
1+
*eval.txt* For Vim version 8.1. Last change: 2019 Jun 17
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1943,10 +1943,29 @@ v:option_new New value of the option. Valid while executing an |OptionSet|
19431943
autocommand.
19441944
*v:option_old*
19451945
v:option_old Old value of the option. Valid while executing an |OptionSet|
1946-
autocommand.
1946+
autocommand. Depending on the command used for setting and the
1947+
kind of option this is either the local old value or the
1948+
global old value.
1949+
*v:option_oldlocal*
1950+
v:option_oldlocal
1951+
Old local value of the option. Valid while executing an
1952+
|OptionSet| autocommand.
1953+
*v:option_oldglobal*
1954+
v:option_oldglobal
1955+
Old global value of the option. Valid while executing an
1956+
|OptionSet| autocommand.
19471957
*v:option_type*
19481958
v:option_type Scope of the set command. Valid while executing an
19491959
|OptionSet| autocommand. Can be either "global" or "local"
1960+
*v:option_command*
1961+
v:option_command
1962+
Command used to set the option. Valid while executing an
1963+
|OptionSet| autocommand.
1964+
value option was set via ~
1965+
"setlocal" |:setlocal| or ":let l:xxx"
1966+
"setglobal" |:setglobal| or ":let g:xxx"
1967+
"set" |:set| or |:let|
1968+
"modeline" |modeline|
19501969
*v:operator* *operator-variable*
19511970
v:operator The last operator given in Normal mode. This is a single
19521971
character except for commands starting with <g> or <z>,
@@ -2164,7 +2183,7 @@ v:val Value of the current item of a |List| or |Dictionary|. Only
21642183

21652184
*v:version* *version-variable*
21662185
v:version Version number of Vim: Major version number times 100 plus
2167-
minor version number. Version 5.0 is 500. Version 5.1 (5.01)
2186+
minor version number. Version 5.0 is 500. Version 5.1
21682187
is 501. Read-only. "version" also works, for backwards
21692188
compatibility, unless |scriptversion| is 3 or higher.
21702189
Use |has()| to check if a certain patch was included, e.g.: >
@@ -2174,10 +2193,10 @@ v:version Version number of Vim: Major version number times 100 plus
21742193
completely different.
21752194

21762195
*v:versionlong* *versionlong-variable*
2177-
v:versionlong Like v:version, but also including the patchlevel. Version
2178-
8.1 with patch 1234 has value 8011234. This can be used like
2179-
this: >
2180-
if v:versionlong >= 8011234
2196+
v:versionlong Like v:version, but also including the patchlevel in the last
2197+
four digits. Version 8.1 with patch 123 has value 8010123.
2198+
This can be used like this: >
2199+
if v:versionlong >= 8010123
21812200
< However, if there are gaps in the list of patches included
21822201
this will not work well. This can happen if a recent patch
21832202
was included into an older version, e.g. for a security fix.
@@ -8104,10 +8123,9 @@ setbufline({expr}, {lnum}, {text}) *setbufline()*
81048123

81058124
{lnum} is used like with |setline()|.
81068125
This works like |setline()| for the specified buffer.
8107-
On success 0 is returned, on failure 1 is returned.
81088126

8109-
If {expr} is not a valid buffer or {lnum} is not valid, an
8110-
error message is given.
8127+
When {expr} is not a valid buffer or {lnum} is not valid then
8128+
1 is returned. On success 0 is returned.
81118129

81128130
setbufvar({expr}, {varname}, {val}) *setbufvar()*
81138131
Set option or local variable {varname} in buffer {expr} to
@@ -8865,7 +8883,7 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
88658883
<
88668884
sound_clear() *sound_clear()*
88678885
Stop playing all sounds.
8868-
{only available when compiled with the +sound feature}
8886+
{only available when compiled with the |+sound| feature}
88698887

88708888
*sound_playevent()*
88718889
sound_playevent({name} [, {callback}])
@@ -8874,8 +8892,11 @@ sound_playevent({name} [, {callback}])
88748892
are used. On Ubuntu they may be found in
88758893
/usr/share/sounds/freedesktop/stereo. Example: >
88768894
call sound_playevent('bell')
8895+
< On MS-Windows, {name} can be SystemAsterisk, SystemDefault,
8896+
SystemExclamation, SystemExit, SystemHand, SystemQuestion,
8897+
SystemStart, SystemWelcome, etc.
88778898

8878-
< When {callback} is specified it is invoked when the sound is
8899+
When {callback} is specified it is invoked when the sound is
88798900
finished. The first argument is the sound ID, the second
88808901
argument is the status:
88818902
0 sound was played to the end
@@ -8887,7 +8908,9 @@ sound_playevent({name} [, {callback}])
88878908
endfunc
88888909
call sound_playevent('bell', 'Callback')
88898910
8890-
< Returns the sound ID, which can be passed to `sound_stop()`.
8911+
< MS-Windows: {callback} doesn't work for this function.
8912+
8913+
Returns the sound ID, which can be passed to `sound_stop()`.
88918914
Returns zero if the sound could not be played.
88928915
{only available when compiled with the |+sound| feature}
88938916

@@ -8903,6 +8926,10 @@ sound_playfile({path} [, {callback}])
89038926
sound_stop({id}) *sound_stop()*
89048927
Stop playing sound {id}. {id} must be previously returned by
89058928
`sound_playevent()` or `sound_playfile()`.
8929+
8930+
On MS-Windows, this does not work for event sound started by
8931+
`sound_playevent()`. To stop event sounds, use `sound_clear()`.
8932+
89068933
{only available when compiled with the |+sound| feature}
89078934

89088935
*soundfold()*
@@ -11573,7 +11600,6 @@ text...
1157311600
# Number
1157411601
* Funcref
1157511602

11576-
1157711603
:unl[et][!] {name} ... *:unlet* *:unl* *E108* *E795*
1157811604
Remove the internal variable {name}. Several variable
1157911605
names can be given, they are all removed. The name
@@ -11600,10 +11626,9 @@ text...
1160011626
If the system does not support deleting an environment
1160111627
variable, it is made empty.
1160211628

11603-
*:cons* *:const* *E996*
11629+
*:cons* *:const*
1160411630
:cons[t] {var-name} = {expr1}
1160511631
:cons[t] [{name1}, {name2}, ...] = {expr1}
11606-
:cons[t] [{name1}, {name2}, ...] .= {expr1}
1160711632
:cons[t] [{name}, ..., ; {lastname}] = {expr1}
1160811633
:cons[t] {var-name} =<< [trim] {marker}
1160911634
text...
@@ -11619,10 +11644,14 @@ text...
1161911644
< This is useful if you want to make sure the variable
1162011645
is not modified.
1162111646
*E995*
11622-
|:const| does not allow to for changing a variable. >
11647+
|:const| does not allow to for changing a variable: >
1162311648
:let x = 1
1162411649
:const x = 2 " Error!
11625-
<
11650+
< *E996*
11651+
Note that environment variables, option values and
11652+
register values cannot be used here, since they cannot
11653+
be locked.
11654+
1162611655
:lockv[ar][!] [depth] {name} ... *:lockvar* *:lockv*
1162711656
Lock the internal variable {name}. Locking means that
1162811657
it can no longer be changed (until it is unlocked).

0 commit comments

Comments
 (0)