From 3561e45fb360a924bc189b5d833c6739193379b7 Mon Sep 17 00:00:00 2001 From: h-east Date: Thu, 10 Oct 2024 18:22:14 +0900 Subject: [PATCH 1/5] Update builtin.{txt,jax} --- doc/builtin.jax | 18 ++++++++++++++++-- en/builtin.txt | 16 ++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/doc/builtin.jax b/doc/builtin.jax index f53d35152..dba075071 100644 --- a/doc/builtin.jax +++ b/doc/builtin.jax @@ -1,4 +1,4 @@ -*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Sep 23 +*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Oct 08 VIMリファレンスマニュアル by Bram Moolenaar @@ -248,6 +248,8 @@ getcharmod() 数値 修飾キーの状態を表す数値を取得 getcharpos({expr}) リスト カーソル、マーク、その他のカーソル位置 getcharsearch() 辞書 最後の文字検索を取得 getcharstr([{expr}]) 文字列 ユーザーから1文字を取得する +getcmdcomplpat() 文字列 現在のコマンドライン補完の補完パターン + を返す getcmdcompltype() 文字列 現在のコマンドライン補完のタイプを返す getcmdline() 文字列 現在のコマンドライン入力を取得 getcmdpos() 数値 コマンドラインのカーソル位置を取得 @@ -3961,6 +3963,17 @@ getcharstr([{expr}]) *getcharstr()* 戻り値の型: |String| +getcmdcomplpat() *getcmdcomplpat()* + 現在のコマンドラインの補完パターンを返す。 + コマンドラインが編集されている場合にのみ機能するため、 + |c_CTRL-\_e| または |c_CTRL-R_=| を使用する必要がある。 + |getcmdtype()|、|setcmdpos()|、|getcmdline()|、 + |getcmdprompt()|、|getcmdcompltype()| および |setcmdline()| も + 参照。 + 補完が定義されていない場合は空の文字列を返す。 + + 戻り値の型: |String| + getcmdcompltype() *getcmdcompltype()* 現在のコマンドライン補完のタイプを返す。 @@ -3968,7 +3981,8 @@ getcmdcompltype() *getcmdcompltype()* |c_CTRL-R_=| を使用する必要がある。 返す文字列については |:command-completion| を参照のこと。 |getcmdtype()|, |setcmdpos()|, |getcmdline()|, - |getcmdprompt()|, |setcmdline()| も参照。 + |getcmdprompt()|, |getcmdcomplpat()| および |setcmdline()| も + 参照。 補完が定義されていない場合は空文字列を返す。 戻り値の型: |String| diff --git a/en/builtin.txt b/en/builtin.txt index fe0b9aa33..880dfcd78 100644 --- a/en/builtin.txt +++ b/en/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2024 Sep 23 +*builtin.txt* For Vim version 9.1. Last change: 2024 Oct 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -230,6 +230,8 @@ getcharmod() Number modifiers for the last typed character getcharpos({expr}) List position of cursor, mark, etc. getcharsearch() Dict last character search getcharstr([{expr}]) String get one character from the user +getcmdcomplpat() String return the completion pattern of the + current command-line completion getcmdcompltype() String return the type of the current command-line completion getcmdline() String return the current command-line input @@ -3973,6 +3975,16 @@ getcharstr([{expr}]) *getcharstr()* Return type: |String| +getcmdcomplpat() *getcmdcomplpat()* + Return completion pattern of the current command-line. + Only works when the command line is being edited, thus + requires use of |c_CTRL-\_e| or |c_CTRL-R_=|. + Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|, + |getcmdprompt()|, |getcmdcompltype()| and |setcmdline()|. + Returns an empty string when completion is not defined. + + Return type: |String| + getcmdcompltype() *getcmdcompltype()* Return the type of the current command-line completion. @@ -3980,7 +3992,7 @@ getcmdcompltype() *getcmdcompltype()* requires use of |c_CTRL-\_e| or |c_CTRL-R_=|. See |:command-completion| for the return string. Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|, - |getcmdprompt()| and |setcmdline()|. + |getcmdprompt()|, |getcmdcomplpat()| and |setcmdline()|. Returns an empty string when completion is not defined. Return type: |String| From a2e0c228692b8a999756a47f49b32e0fe565639c Mon Sep 17 00:00:00 2001 From: h-east Date: Fri, 11 Oct 2024 15:21:31 +0900 Subject: [PATCH 2/5] Update by original --- doc/builtin.jax | 5 +++-- en/builtin.txt | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/builtin.jax b/doc/builtin.jax index dba075071..0cfbf9d62 100644 --- a/doc/builtin.jax +++ b/doc/builtin.jax @@ -1,4 +1,4 @@ -*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Oct 08 +*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Oct 09 VIMリファレンスマニュアル by Bram Moolenaar @@ -4078,7 +4078,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* cscope |:cscope|のサブオプション custom,{func} {func} で定義されたカスタム補完 customlist,{func} {func} で定義されたカスタム補完 - diff_buffer |:diffget| と |:diffput| の補完 + diff_buffer |:diffget| と |:diffput| の補完 dir ディレクトリ名 dir_in_path |'cdpath'| 内のディレクトリ名 environment 環境変数名 @@ -4102,6 +4102,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* runtime |:runtime| 補完 scriptnames 読み込まれているスクリプト名 |:scriptnames| shellcmd シェルコマンド + shellcmdline ファイル名を引数とするシェルコマンドライン sign |:sign|サブオプション syntax 構文ファイル名 |'syntax'| syntime |:syntime|サブオプション diff --git a/en/builtin.txt b/en/builtin.txt index 880dfcd78..44e9ee019 100644 --- a/en/builtin.txt +++ b/en/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2024 Oct 08 +*builtin.txt* For Vim version 9.1. Last change: 2024 Oct 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -4091,7 +4091,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* cscope |:cscope| suboptions custom,{func} custom completion, defined via {func} customlist,{func} custom completion, defined via {func} - diff_buffer |:diffget| and |:diffput| completion + diff_buffer |:diffget| and |:diffput| completion dir directory names dir_in_path directory names in |'cdpath'| environment environment variable names @@ -4115,6 +4115,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* runtime |:runtime| completion scriptnames sourced script names |:scriptnames| shellcmd Shell command + shellcmdline Shell command line with filename arguments sign |:sign| suboptions syntax syntax file names |'syntax'| syntime |:syntime| suboptions From 487b60d560f477b540f002c9704c94baef425b39 Mon Sep 17 00:00:00 2001 From: h-east Date: Sun, 13 Oct 2024 16:16:16 +0900 Subject: [PATCH 3/5] Update by original --- doc/builtin.jax | 10 +++++----- en/builtin.txt | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/builtin.jax b/doc/builtin.jax index 0cfbf9d62..f5a6a6456 100644 --- a/doc/builtin.jax +++ b/doc/builtin.jax @@ -1,4 +1,4 @@ -*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Oct 09 +*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Oct 12 VIMリファレンスマニュアル by Bram Moolenaar @@ -8381,10 +8381,10 @@ remote_expr({server}, {string} [, {idvar} [, {timeout}]]) {string} を {server} に送信する。引数 {server} は文字列。 |{server}| も参照。 - {string} は式と見なされ、評価した結果が返ってくる。戻り値は文 - 字列かリスト |List| でなければならない。リストの場合は要素を連 - 結して文字列に変換される。要素間の区切りは改行文字となる - (join(expr, "\n")と同様)。 + {string} は式と見なされ、評価した結果が返ってくる。結果は文字 + 列または |List| でなければばらず、他の型は文字列に変換される。 + |List| は、join(expr, "\n") のように、項目を改行で結合し (末尾 + には付かない)、文字列に変換される。 空でない {idvar} が渡された場合は変数名と見なされ、後で |remote_read()| で使われる {serverid} がその変数に保存される。 diff --git a/en/builtin.txt b/en/builtin.txt index 44e9ee019..15de27db5 100644 --- a/en/builtin.txt +++ b/en/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2024 Oct 09 +*builtin.txt* For Vim version 9.1. Last change: 2024 Oct 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -8529,10 +8529,10 @@ remote_expr({server}, {string} [, {idvar} [, {timeout}]]) string, also see |{server}|. The string is sent as an expression and the result is returned - after evaluation. The result must be a String or a |List|. A - |List| is turned into a String by joining the items with a - line break in between (not at the end), like with join(expr, - "\n"). + after evaluation. The result must be a String or a |List| + other types will be converted to String. A |List| is turned + into a String by joining the items with a line break in + between (not at the end), like with join(expr, "\n"). If {idvar} is present and not empty, it is taken as the name of a variable and a {serverid} for later use with From d91ed5ec10977cbbf9a4ec0660c3fcbab350ccb9 Mon Sep 17 00:00:00 2001 From: h-east Date: Mon, 14 Oct 2024 00:40:26 +0900 Subject: [PATCH 4/5] Fix by review --- doc/builtin.jax | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/builtin.jax b/doc/builtin.jax index f5a6a6456..210a7be80 100644 --- a/doc/builtin.jax +++ b/doc/builtin.jax @@ -2644,7 +2644,7 @@ exists({expr}) *exists()* ば0となる。 Note: コンパイルされる |:def| 関数は実行時に評価が完了する。 - `exists_compiled()` を使うことでコンパイル時に式が評価される。 + `exists_compiled()` を使うことでコンパイル時に式が評価される。 ある機能がサポートされているか判定するには|has()|を使う。 ファイルが存在するかを判定するには|filereadable()|を使う。 @@ -3979,11 +3979,11 @@ getcmdcompltype() *getcmdcompltype()* 現在のコマンドライン補完のタイプを返す。 コマンドラインが編集時にのみ動作するので、|c_CTRL-e| または |c_CTRL-R_=| を使用する必要がある。 - 返す文字列については |:command-completion| を参照のこと。 + 返す文字列については |:command-completion| を参照のこと。 |getcmdtype()|, |setcmdpos()|, |getcmdline()|, |getcmdprompt()|, |getcmdcomplpat()| および |setcmdline()| も 参照。 - 補完が定義されていない場合は空文字列を返す。 + 補完が定義されていない場合は空文字列を返す。 戻り値の型: |String| @@ -4027,7 +4027,7 @@ getcmdprompt() *getcmdprompt()* getcmdscreenpos() *getcmdscreenpos()* コマンドラインのカーソルのスクリーン位置をバイト単位で返す。最 初の桁は 1 である。 - |getcmdpos()| の代わりにプロンプトの位置を加える。 + |getcmdpos()| の代わりにプロンプトの位置を加える。 コマンドラインの編集時のみ動作するため、|c_CTRL-e| または |c_CTRL-R_=| または式マッピングを使用する必要がある。それ以外 は 0 を返す。 @@ -7110,7 +7110,7 @@ matchlist({expr}, {pat} [, {start} [, {count}]]) *matchlist()* < 結果は['acd', 'a', '', 'c', 'd', '', '', '', '', '']となる。 マッチしなかったときは空リストを返す。 - リストを渡すことはできるが、あまり役に立たない。 + リストを渡すことはできるが、あまり役に立たない。 |method| としても使用できる: > GetText()->matchlist('word') From ad3b3bf4fd86b22027eaec0d74dd6666992183e9 Mon Sep 17 00:00:00 2001 From: h_east Date: Mon, 14 Oct 2024 00:49:27 +0900 Subject: [PATCH 5/5] Update doc/builtin.jax Co-authored-by: mityu --- doc/builtin.jax | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/builtin.jax b/doc/builtin.jax index f5a6a6456..01099f885 100644 --- a/doc/builtin.jax +++ b/doc/builtin.jax @@ -3967,8 +3967,8 @@ getcmdcomplpat() *getcmdcomplpat()* 現在のコマンドラインの補完パターンを返す。 コマンドラインが編集されている場合にのみ機能するため、 |c_CTRL-\_e| または |c_CTRL-R_=| を使用する必要がある。 - |getcmdtype()|、|setcmdpos()|、|getcmdline()|、 - |getcmdprompt()|、|getcmdcompltype()| および |setcmdline()| も + |getcmdtype()|, |setcmdpos()|, |getcmdline()|, + |getcmdprompt()|, |getcmdcompltype()| および |setcmdline()| も 参照。 補完が定義されていない場合は空の文字列を返す。