From 2b293aa8048c5a98a10e84ebb6aa9ddd892ca910 Mon Sep 17 00:00:00 2001 From: h-east Date: Thu, 7 Nov 2024 20:41:50 +0900 Subject: [PATCH 1/3] Update builtin.{txt,jax} --- doc/builtin.jax | 22 +++++++++++++++------- en/builtin.txt | 22 +++++++++++++++------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/doc/builtin.jax b/doc/builtin.jax index cc851153e..0024a0e07 100644 --- a/doc/builtin.jax +++ b/doc/builtin.jax @@ -1,4 +1,4 @@ -*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Nov 01 +*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Nov 06 VIMリファレンスマニュアル by Bram Moolenaar @@ -513,9 +513,9 @@ prop_type_list([{props}]) リスト プロパティタイプ一覧を取得 pum_getpos() 辞書 ポップアップメニューが表示されている場 合、位置とサイズを取得 pumvisible() 数値 ポップアップメニューが表示されているか -py3eval({expr}) 任意 |python3| の式を評価する -pyeval({expr}) 任意 |Python| の式を評価する -pyxeval({expr}) 任意 |python_x| の式を評価する +py3eval({expr}[, {locals}]) 任意 |python3| の式を評価する +pyeval({expr}[, {locals}]) 任意 |Python| の式を評価する +pyxeval({expr}[, {locals}]) 任意 |python_x| の式を評価する rand([{expr}]) 数値 疑似乱数を取得する range({expr} [, {max} [, {stride}]]) リスト {expr}から{max}までの要素のリスト @@ -7982,9 +7982,14 @@ pumvisible() *pumvisible()* 戻り値の型: |Number| -py3eval({expr}) *py3eval()* +py3eval({expr}[, {locals}]) *py3eval()* Python の式 {expr} を評価して、結果を Vim のデータ形式にして返 す。 + {locals} |Dictionary| が指定されている場合は、式で使用できる + ローカル変数のセットを定義する。キーは変数名で、値は変数の値で + ある。|Dictionary| と |List| の値は参照され、式によって + (|python-bindeval| が使用されたかのように) 更新される場合があ + る。 数値と文字列はそのまま返る (ただし文字列はコピーされ、Unicode から 'encoding' に変換される)。 リストは Vim の |List| 型に変換される。 @@ -7994,15 +7999,17 @@ py3eval({expr}) *py3eval()* |method| としても使用できる: > GetExpr()->py3eval() + 'b",".join(l)'->py3eval({'l': ['a', 'b', 'c']}) < 戻り値の型: any。{expr} による {|+python3| 機能付きでコンパイルされたときのみ利用可能} *E858* *E859* -pyeval({expr}) *pyeval()* +pyeval({expr}[, {locals}]) *pyeval()* Python の式 {expr} を評価して、結果を Vim のデータ形式にして返 す。 + {locals} については |py3eval()| を参照。 数値と文字列はそのまま返る (ただし文字列はコピーされる)。 リストは Vim の |List| 型に変換される。 辞書は Vim の |Dictionary| 型に変換される。文字列ではない辞書 @@ -8016,9 +8023,10 @@ pyeval({expr}) *pyeval()* {|+python| 機能付きでコンパイルされたときのみ利用可能} -pyxeval({expr}) *pyxeval()* +pyxeval({expr}[, {locals}]) *pyxeval()* Python の式 {expr} を評価して、結果を Vim のデータ形式にして返 す。 + {locals} については |py3eval()| を参照。 Python 2 または 3 を使用する。|python_x| と 'pyxversion' を参 照。 |pyeval()|, |py3eval()| も参照。 diff --git a/en/builtin.txt b/en/builtin.txt index edc425a5a..70d6f47a5 100644 --- a/en/builtin.txt +++ b/en/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 01 +*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -467,9 +467,9 @@ prop_type_get({name} [, {props}]) prop_type_list([{props}]) List get list of property types pum_getpos() Dict position and size of pum if visible pumvisible() Number whether popup menu is visible -py3eval({expr}) any evaluate |python3| expression -pyeval({expr}) any evaluate |Python| expression -pyxeval({expr}) any evaluate |python_x| expression +py3eval({expr}[, {locals}]) any evaluate |python3| expression +pyeval({expr}[, {locals}]) any evaluate |Python| expression +pyxeval({expr}[, {locals}]) any evaluate |python_x| expression rand([{expr}]) Number get pseudo-random number range({expr} [, {max} [, {stride}]]) List items from {expr} to {max} @@ -8127,9 +8127,14 @@ pumvisible() *pumvisible()* Return type: |Number| -py3eval({expr}) *py3eval()* +py3eval({expr}[, {locals}]) *py3eval()* Evaluate Python expression {expr} and return its result converted to Vim data structures. + If a {locals} |Dictionary| is given, it defines set of local + variables available in the expression. The keys are variable + names and the values are the variable values. |Dictionary| and + |List| values are referenced, and may be updated by the + expression (as if |python-bindeval| was used). Numbers and strings are returned as they are (strings are copied though, Unicode strings are additionally converted to 'encoding'). @@ -8141,15 +8146,17 @@ py3eval({expr}) *py3eval()* Can also be used as a |method|: > GetExpr()->py3eval() + 'b",".join(l)'->py3eval({'l': ['a', 'b', 'c']}) < Return type: any, depending on {expr} {only available when compiled with the |+python3| feature} *E858* *E859* -pyeval({expr}) *pyeval()* +pyeval({expr}[, {locals}]) *pyeval()* Evaluate Python expression {expr} and return its result converted to Vim data structures. + For {locals} see |py3eval()|. Numbers and strings are returned as they are (strings are copied though). Lists are represented as Vim |List| type. @@ -8165,9 +8172,10 @@ pyeval({expr}) *pyeval()* {only available when compiled with the |+python| feature} -pyxeval({expr}) *pyxeval()* +pyxeval({expr}[, {locals}]) *pyxeval()* Evaluate Python expression {expr} and return its result converted to Vim data structures. + For {locals} see |py3eval()|. Uses Python 2 or 3, see |python_x| and 'pyxversion'. See also: |pyeval()|, |py3eval()| From 425566de0c9e1e72d719091325f77bcf79b7d093 Mon Sep 17 00:00:00 2001 From: h-east Date: Sun, 10 Nov 2024 02:49:05 +0900 Subject: [PATCH 2/3] Update by original --- doc/builtin.jax | 8 ++++---- en/builtin.txt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/builtin.jax b/doc/builtin.jax index 0024a0e07..782452d0a 100644 --- a/doc/builtin.jax +++ b/doc/builtin.jax @@ -1,4 +1,4 @@ -*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Nov 06 +*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Nov 09 VIMリファレンスマニュアル by Bram Moolenaar @@ -5157,7 +5157,7 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()* {list} による -glob2regpat({string}) *glob2regpat()* +glob2regpat({string}) *glob2regpat()* glob()に使われるファイルパターンを検索パターンに変換する。 結果はファイル名の文字列とのマッチに使用できる。例えば、 > if filename =~ glob2regpat('Make*.mak') @@ -5593,7 +5593,7 @@ iconv({string}, {from}, {to}) *iconv()* 戻り値の型: |String| -id({item}) *id()* +id({item}) *id()* 結果は、{item} に関連付けられた一意の文字列であり、{item} の内 容に関連付けられたものではない。{item} が存在し参照されている 間のみ有効である。結果を生成する vim のインスタンスでのみ有効 @@ -6978,7 +6978,7 @@ matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}]) 戻り値の型: list> または list -matchdelete({id}, [, {win}]) *matchdelete()* *E802* *E803* +matchdelete({id} [, {win}) *matchdelete()* *E802* *E803* |matchadd()| または |:match| で定義したマッチの中で ID が {id} であるものを削除する。成功したときは 0、失敗したときは -1 を返す。|matchadd()| の例を参照。すべてのマッチを削除するの diff --git a/en/builtin.txt b/en/builtin.txt index 70d6f47a5..d32c09d2f 100644 --- a/en/builtin.txt +++ b/en/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 06 +*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -5203,7 +5203,7 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()* on {list} -glob2regpat({string}) *glob2regpat()* +glob2regpat({string}) *glob2regpat()* Convert a file pattern, as used by glob(), into a search pattern. The result can be used to match with a string that is a file name. E.g. > @@ -5656,7 +5656,7 @@ iconv({string}, {from}, {to}) *iconv()* Return type: |String| -id({item}) *id()* +id({item}) *id()* The result is a unique String associated with the {item} and not with the {item}'s contents. It is only valid while the {item} exists and is referenced. It is valid only in the @@ -7081,7 +7081,7 @@ matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}]) Return type: list> or list -matchdelete({id} [, {win}) *matchdelete()* *E802* *E803* +matchdelete({id} [, {win}) *matchdelete()* *E802* *E803* Deletes a match with ID {id} previously defined by |matchadd()| or one of the |:match| commands. Returns 0 if successful, otherwise -1. See example for |matchadd()|. All matches can From 867bcd76537d0ae85367c8ecc634ff889d70e7d0 Mon Sep 17 00:00:00 2001 From: h-east Date: Tue, 12 Nov 2024 00:50:34 +0900 Subject: [PATCH 3/3] Update by original --- doc/builtin.jax | 14 +++++++------- en/builtin.txt | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/builtin.jax b/doc/builtin.jax index 782452d0a..9e45599d2 100644 --- a/doc/builtin.jax +++ b/doc/builtin.jax @@ -1,4 +1,4 @@ -*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Nov 09 +*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Nov 10 VIMリファレンスマニュアル by Bram Moolenaar @@ -513,9 +513,9 @@ prop_type_list([{props}]) リスト プロパティタイプ一覧を取得 pum_getpos() 辞書 ポップアップメニューが表示されている場 合、位置とサイズを取得 pumvisible() 数値 ポップアップメニューが表示されているか -py3eval({expr}[, {locals}]) 任意 |python3| の式を評価する -pyeval({expr}[, {locals}]) 任意 |Python| の式を評価する -pyxeval({expr}[, {locals}]) 任意 |python_x| の式を評価する +py3eval({expr} [, {locals}]) 任意 |python3| の式を評価する +pyeval({expr} [, {locals}]) 任意 |Python| の式を評価する +pyxeval({expr} [, {locals}]) 任意 |python_x| の式を評価する rand([{expr}]) 数値 疑似乱数を取得する range({expr} [, {max} [, {stride}]]) リスト {expr}から{max}までの要素のリスト @@ -7982,7 +7982,7 @@ pumvisible() *pumvisible()* 戻り値の型: |Number| -py3eval({expr}[, {locals}]) *py3eval()* +py3eval({expr} [, {locals}]) *py3eval()* Python の式 {expr} を評価して、結果を Vim のデータ形式にして返 す。 {locals} |Dictionary| が指定されている場合は、式で使用できる @@ -8006,7 +8006,7 @@ py3eval({expr}[, {locals}]) *py3eval()* {|+python3| 機能付きでコンパイルされたときのみ利用可能} *E858* *E859* -pyeval({expr}[, {locals}]) *pyeval()* +pyeval({expr} [, {locals}]) *pyeval()* Python の式 {expr} を評価して、結果を Vim のデータ形式にして返 す。 {locals} については |py3eval()| を参照。 @@ -8023,7 +8023,7 @@ pyeval({expr}[, {locals}]) *pyeval()* {|+python| 機能付きでコンパイルされたときのみ利用可能} -pyxeval({expr}[, {locals}]) *pyxeval()* +pyxeval({expr} [, {locals}]) *pyxeval()* Python の式 {expr} を評価して、結果を Vim のデータ形式にして返 す。 {locals} については |py3eval()| を参照。 diff --git a/en/builtin.txt b/en/builtin.txt index d32c09d2f..67f447d7d 100644 --- a/en/builtin.txt +++ b/en/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 09 +*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -467,9 +467,9 @@ prop_type_get({name} [, {props}]) prop_type_list([{props}]) List get list of property types pum_getpos() Dict position and size of pum if visible pumvisible() Number whether popup menu is visible -py3eval({expr}[, {locals}]) any evaluate |python3| expression -pyeval({expr}[, {locals}]) any evaluate |Python| expression -pyxeval({expr}[, {locals}]) any evaluate |python_x| expression +py3eval({expr} [, {locals}]) any evaluate |python3| expression +pyeval({expr} [, {locals}]) any evaluate |Python| expression +pyxeval({expr} [, {locals}]) any evaluate |python_x| expression rand([{expr}]) Number get pseudo-random number range({expr} [, {max} [, {stride}]]) List items from {expr} to {max} @@ -8127,7 +8127,7 @@ pumvisible() *pumvisible()* Return type: |Number| -py3eval({expr}[, {locals}]) *py3eval()* +py3eval({expr} [, {locals}]) *py3eval()* Evaluate Python expression {expr} and return its result converted to Vim data structures. If a {locals} |Dictionary| is given, it defines set of local @@ -8153,7 +8153,7 @@ py3eval({expr}[, {locals}]) *py3eval()* {only available when compiled with the |+python3| feature} *E858* *E859* -pyeval({expr}[, {locals}]) *pyeval()* +pyeval({expr} [, {locals}]) *pyeval()* Evaluate Python expression {expr} and return its result converted to Vim data structures. For {locals} see |py3eval()|. @@ -8172,7 +8172,7 @@ pyeval({expr}[, {locals}]) *pyeval()* {only available when compiled with the |+python| feature} -pyxeval({expr}[, {locals}]) *pyxeval()* +pyxeval({expr} [, {locals}]) *pyxeval()* Evaluate Python expression {expr} and return its result converted to Vim data structures. For {locals} see |py3eval()|.