Skip to content

Commit 2b293aa

Browse files
committed
Update builtin.{txt,jax}
1 parent 9337885 commit 2b293aa

File tree

2 files changed

+30
-14
lines changed

2 files changed

+30
-14
lines changed

doc/builtin.jax

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Nov 01
1+
*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Nov 06
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -513,9 +513,9 @@ prop_type_list([{props}]) リスト プロパティタイプ一覧を取得
513513
pum_getpos() 辞書 ポップアップメニューが表示されている場
514514
合、位置とサイズを取得
515515
pumvisible() 数値 ポップアップメニューが表示されているか
516-
py3eval({expr}) 任意 |python3| の式を評価する
517-
pyeval({expr}) 任意 |Python| の式を評価する
518-
pyxeval({expr}) 任意 |python_x| の式を評価する
516+
py3eval({expr}[, {locals}]) 任意 |python3| の式を評価する
517+
pyeval({expr}[, {locals}]) 任意 |Python| の式を評価する
518+
pyxeval({expr}[, {locals}]) 任意 |python_x| の式を評価する
519519
rand([{expr}]) 数値 疑似乱数を取得する
520520
range({expr} [, {max} [, {stride}]])
521521
リスト {expr}から{max}までの要素のリスト
@@ -7982,9 +7982,14 @@ pumvisible() *pumvisible()*
79827982
戻り値の型: |Number|
79837983

79847984

7985-
py3eval({expr}) *py3eval()*
7985+
py3eval({expr}[, {locals}]) *py3eval()*
79867986
Python の式 {expr} を評価して、結果を Vim のデータ形式にして返
79877987
す。
7988+
{locals} |Dictionary| が指定されている場合は、式で使用できる
7989+
ローカル変数のセットを定義する。キーは変数名で、値は変数の値で
7990+
ある。|Dictionary| と |List| の値は参照され、式によって
7991+
(|python-bindeval| が使用されたかのように) 更新される場合があ
7992+
る。
79887993
数値と文字列はそのまま返る (ただし文字列はコピーされ、Unicode
79897994
から 'encoding' に変換される)。
79907995
リストは Vim の |List| 型に変換される。
@@ -7994,15 +7999,17 @@ py3eval({expr}) *py3eval()*
79947999

79958000
|method| としても使用できる: >
79968001
GetExpr()->py3eval()
8002+
'b",".join(l)'->py3eval({'l': ['a', 'b', 'c']})
79978003
<
79988004
戻り値の型: any。{expr} による
79998005

80008006
{|+python3| 機能付きでコンパイルされたときのみ利用可能}
80018007

80028008
*E858* *E859*
8003-
pyeval({expr}) *pyeval()*
8009+
pyeval({expr}[, {locals}]) *pyeval()*
80048010
Python の式 {expr} を評価して、結果を Vim のデータ形式にして返
80058011
す。
8012+
{locals} については |py3eval()| を参照。
80068013
数値と文字列はそのまま返る (ただし文字列はコピーされる)。
80078014
リストは Vim の |List| 型に変換される。
80088015
辞書は Vim の |Dictionary| 型に変換される。文字列ではない辞書
@@ -8016,9 +8023,10 @@ pyeval({expr}) *pyeval()*
80168023

80178024
{|+python| 機能付きでコンパイルされたときのみ利用可能}
80188025

8019-
pyxeval({expr}) *pyxeval()*
8026+
pyxeval({expr}[, {locals}]) *pyxeval()*
80208027
Python の式 {expr} を評価して、結果を Vim のデータ形式にして返
80218028
す。
8029+
{locals} については |py3eval()| を参照。
80228030
Python 2 または 3 を使用する。|python_x| と 'pyxversion' を参
80238031
照。
80248032
|pyeval()|, |py3eval()| も参照。

en/builtin.txt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 01
1+
*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 06
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -467,9 +467,9 @@ prop_type_get({name} [, {props}])
467467
prop_type_list([{props}]) List get list of property types
468468
pum_getpos() Dict position and size of pum if visible
469469
pumvisible() Number whether popup menu is visible
470-
py3eval({expr}) any evaluate |python3| expression
471-
pyeval({expr}) any evaluate |Python| expression
472-
pyxeval({expr}) any evaluate |python_x| expression
470+
py3eval({expr}[, {locals}]) any evaluate |python3| expression
471+
pyeval({expr}[, {locals}]) any evaluate |Python| expression
472+
pyxeval({expr}[, {locals}]) any evaluate |python_x| expression
473473
rand([{expr}]) Number get pseudo-random number
474474
range({expr} [, {max} [, {stride}]])
475475
List items from {expr} to {max}
@@ -8127,9 +8127,14 @@ pumvisible() *pumvisible()*
81278127
Return type: |Number|
81288128

81298129

8130-
py3eval({expr}) *py3eval()*
8130+
py3eval({expr}[, {locals}]) *py3eval()*
81318131
Evaluate Python expression {expr} and return its result
81328132
converted to Vim data structures.
8133+
If a {locals} |Dictionary| is given, it defines set of local
8134+
variables available in the expression. The keys are variable
8135+
names and the values are the variable values. |Dictionary| and
8136+
|List| values are referenced, and may be updated by the
8137+
expression (as if |python-bindeval| was used).
81338138
Numbers and strings are returned as they are (strings are
81348139
copied though, Unicode strings are additionally converted to
81358140
'encoding').
@@ -8141,15 +8146,17 @@ py3eval({expr}) *py3eval()*
81418146

81428147
Can also be used as a |method|: >
81438148
GetExpr()->py3eval()
8149+
'b",".join(l)'->py3eval({'l': ['a', 'b', 'c']})
81448150
<
81458151
Return type: any, depending on {expr}
81468152

81478153
{only available when compiled with the |+python3| feature}
81488154

81498155
*E858* *E859*
8150-
pyeval({expr}) *pyeval()*
8156+
pyeval({expr}[, {locals}]) *pyeval()*
81518157
Evaluate Python expression {expr} and return its result
81528158
converted to Vim data structures.
8159+
For {locals} see |py3eval()|.
81538160
Numbers and strings are returned as they are (strings are
81548161
copied though).
81558162
Lists are represented as Vim |List| type.
@@ -8165,9 +8172,10 @@ pyeval({expr}) *pyeval()*
81658172

81668173
{only available when compiled with the |+python| feature}
81678174

8168-
pyxeval({expr}) *pyxeval()*
8175+
pyxeval({expr}[, {locals}]) *pyxeval()*
81698176
Evaluate Python expression {expr} and return its result
81708177
converted to Vim data structures.
8178+
For {locals} see |py3eval()|.
81718179
Uses Python 2 or 3, see |python_x| and 'pyxversion'.
81728180
See also: |pyeval()|, |py3eval()|
81738181

0 commit comments

Comments
 (0)