Skip to content

Commit ea50b8c

Browse files
authored
Merge pull request #1944 from h-east/update-builtin
Update builtin.{txt,jax}
2 parents 70299bc + 7c3125b commit ea50b8c

File tree

2 files changed

+77
-34
lines changed

2 files changed

+77
-34
lines changed

doc/builtin.jax

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

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -247,11 +247,12 @@ getbufvar({buf}, {varname} [, {def}])
247247
getcellpixels() リスト 文字のセルのピクセルサイズを取得する
248248
getcellwidths() リスト 文字のセル幅の上書き設定を取得
249249
getchangelist([{buf}]) リスト 変更リスト要素のリスト
250-
getchar([{expr}]) 数値/文字列 ユーザーから1文字を取得する
250+
getchar([{expr} [, {opts}]]) 数値/文字列
251+
ユーザーから1文字を取得する
251252
getcharmod() 数値 修飾キーの状態を表す数値を取得
252253
getcharpos({expr}) リスト カーソル、マーク、その他のカーソル位置
253254
getcharsearch() 辞書 最後の文字検索を取得
254-
getcharstr([{expr}]) 文字列 ユーザーから1文字を取得する
255+
getcharstr([{expr} [, {opts}]]) 文字列 ユーザーから1文字を取得する
255256
getcmdcomplpat() 文字列 現在のコマンドライン補完の補完パターン
256257
を返す
257258
getcmdcompltype() 文字列 現在のコマンドライン補完のタイプを返す
@@ -3915,15 +3916,17 @@ getchangelist([{buf}]) *getchangelist()*
39153916
戻り値の型: list<any>
39163917

39173918

3918-
getchar([{expr}]) *getchar()*
3919+
getchar([{expr} [, {opts}]]) *getchar()*
39193920
ユーザーまたは入力ストリームから1文字を取得する。
3920-
{expr} が省略された場合、1文字を取得できるまで待つ。
3921+
{expr} が省略されているか -1 の場合は、1文字を取得できるまで待
3922+
つ。
39213923
{expr} が0の場合、1文字を取得できる時だけ取得する。取得できな
39223924
い時は0を返す。
39233925
{expr} が1の場合は、1文字を取得できるかを判定するだけである。
39243926
入力は消費されない。取得できないと判定された時は0を返
39253927
す。
3926-
常に文字列として取得したい場合は |getcharstr()| を使用する。
3928+
常に文字列として取得したい場合は |getcharstr()| を使用するか、
3929+
{opts} で "number" に |FALSE| を指定する。
39273930

39283931
{expr} が省略されたときや {expr} が0のときは、文字全体または特
39293932
殊キーを返す。それが1文字なら戻り値は数値である。これを文字列
@@ -3932,6 +3935,8 @@ getchar([{expr}]) *getchar()*
39323935
特殊キーとは0x80(10進数で128)で始まるバイト列からなる文字列で
39333936
ある。これは文字列 "\<Key>" と同じ値である(例: "\<Left>")。戻
39343937
り値は文字列であり、修飾キー(shift, control, alt)は含まれない。
3938+
|keytrans()| は、返された文字列を読み取り可能な形式に変換する
3939+
ためにも使用できる。
39353940

39363941
{expr} が0や Esc が入力された場合は、これがエスケープシーケン
39373942
スの始まりであるかどうかをVimが知るために待つ間、短い遅延があ
@@ -3943,6 +3948,29 @@ getchar([{expr}]) *getchar()*
39433948

39443949
修飾キーを取得するには getcharmod() を使う。
39453950

3951+
オプション引数 {opts} は Dict であり、次の項目をサポートする:
3952+
3953+
cursor 文字を待機するときのカーソルの動作を指
3954+
定する文字列。
3955+
"hide": カーソルを非表示にする。
3956+
"keep": 現在のカーソルを変更しない。
3957+
"msg": カーソルをメッセージ領域に移動
3958+
する。
3959+
(デフォルト: "msg")
3960+
3961+
number |TRUE| の場合、単一文字を取得するとき
3962+
に数値を返す。
3963+
|FALSE| の場合、戻り値は常に文字列に変
3964+
換され、文字が利用できない場合は (0 で
3965+
はなく) 空の文字列が返される。
3966+
(デフォルト: |TRUE|)
3967+
3968+
simplify |TRUE| の場合、可能であれば文字に修飾
3969+
子を含める。例えば、CTRL-I と <Tab> に
3970+
同じ値を返す。|FALSE| の場合、文字に修
3971+
飾子を含めない。
3972+
(デフォルト: |TRUE|)
3973+
39463974
ユーザーがマウスをクリックしたときはマウスイベントを返す。クリッ
39473975
クした位置は|v:mouse_col|, |v:mouse_lnum|, |v:mouse_winid|,
39483976
|v:mouse_win|で得られる。|getmousepos()| も使える。マウスの移
@@ -4053,16 +4081,9 @@ getcharsearch() *getcharsearch()*
40534081
戻り値の型: dict<any>
40544082

40554083

4056-
getcharstr([{expr}]) *getcharstr()*
4057-
ユーザーまたは入力ストリームから1文字を文字列として取得する。
4058-
{expr} が省略された場合、1文字を取得できるまで待つ。
4059-
{expr} が0もしくは偽の場合、1文字を取得できる時だけ取得する。
4060-
取得できない時は空文字列を返す。
4061-
{expr} が1もしくは真の場合は、1文字を取得できるかを判定するだ
4062-
けである。入力は消費されない。取得できないと判定された
4063-
時は空文字列を返す。
4064-
結果の数値が文字列に変換される以外は |getchar()| と同様に動作
4065-
する。
4084+
getcharstr([{expr} [, {opts}]]) *getcharstr()*
4085+
|getchar()| と同じだが、常に文字列を返し、{opts} では "number"
4086+
は許可されない。
40664087

40674088
戻り値の型: |String|
40684089

@@ -12454,6 +12475,7 @@ gui_win32s Win32sのGUIが有効である (Windows 3.1)
1245412475
haiku Haikuバージョン
1245512476
hangul_input ハングル入力サポート
1245612477
hpux HP-UXバージョン
12478+
hurd GNU/Hurd バージョン
1245712479
iconv iconv()をサポート
1245812480
insert_expand 挿入モード時にCTRL-Xの展開がサポートされる (常に true)
1245912481
job |channel| プロセス間通信と |job| ジョブをサポート

en/builtin.txt

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.1. Last change: 2025 Feb 01
1+
*builtin.txt* For Vim version 9.1. Last change: 2025 Feb 06
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -228,12 +228,12 @@ getbufvar({buf}, {varname} [, {def}])
228228
getcellpixels() List get character cell pixel size
229229
getcellwidths() List get character cell width overrides
230230
getchangelist([{buf}]) List list of change list items
231-
getchar([{expr}]) Number or String
231+
getchar([{expr} [, {opts}]]) Number or String
232232
get one character from the user
233233
getcharmod() Number modifiers for the last typed character
234234
getcharpos({expr}) List position of cursor, mark, etc.
235235
getcharsearch() Dict last character search
236-
getcharstr([{expr}]) String get one character from the user
236+
getcharstr([{expr} [, {opts}]]) String get one character from the user
237237
getcmdcomplpat() String return the completion pattern of the
238238
current command-line completion
239239
getcmdcompltype() String return the type of the current
@@ -3918,14 +3918,16 @@ getchangelist([{buf}]) *getchangelist()*
39183918
Return type: list<any>
39193919

39203920

3921-
getchar([{expr}]) *getchar()*
3921+
getchar([{expr} [, {opts}]]) *getchar()*
39223922
Get a single character from the user or input stream.
3923-
If {expr} is omitted, wait until a character is available.
3923+
If {expr} is omitted or is -1, wait until a character is
3924+
available.
39243925
If {expr} is 0, only get a character when one is available.
39253926
Return zero otherwise.
39263927
If {expr} is 1, only check if a character is available, it is
39273928
not consumed. Return zero if no character available.
3928-
If you prefer always getting a string use |getcharstr()|.
3929+
If you prefer always getting a string use |getcharstr()|, or
3930+
specify |FALSE| as "number" in {opts}.
39293931

39303932
Without {expr} and when {expr} is 0 a whole character or
39313933
special key is returned. If it is a single character, the
@@ -3935,7 +3937,8 @@ getchar([{expr}]) *getchar()*
39353937
starting with 0x80 (decimal: 128). This is the same value as
39363938
the String "\<Key>", e.g., "\<Left>". The returned value is
39373939
also a String when a modifier (shift, control, alt) was used
3938-
that is not included in the character.
3940+
that is not included in the character. |keytrans()| can also
3941+
be used to convert a returned String into a readable form.
39393942

39403943
When {expr} is 0 and Esc is typed, there will be a short delay
39413944
while Vim waits to see if this is the start of an escape
@@ -3947,6 +3950,31 @@ getchar([{expr}]) *getchar()*
39473950

39483951
Use getcharmod() to obtain any additional modifiers.
39493952

3953+
The optional argument {opts} is a Dict and supports the
3954+
following items:
3955+
3956+
cursor A String specifying cursor behavior
3957+
when waiting for a character.
3958+
"hide": hide the cursor.
3959+
"keep": keep current cursor unchanged.
3960+
"msg": move cursor to message area.
3961+
(default: "msg")
3962+
3963+
number If |TRUE|, return a Number when getting
3964+
a single character.
3965+
If |FALSE|, the return value is always
3966+
converted to a String, and an empty
3967+
String (instead of 0) is returned when
3968+
no character is available.
3969+
(default: |TRUE|)
3970+
3971+
simplify If |TRUE|, include modifiers in the
3972+
character if possible. E.g., return
3973+
the same value for CTRL-I and <Tab>.
3974+
If |FALSE|, don't include modifiers in
3975+
the character.
3976+
(default: |TRUE|)
3977+
39503978
When the user clicks a mouse button, the mouse event will be
39513979
returned. The position can then be found in |v:mouse_col|,
39523980
|v:mouse_lnum|, |v:mouse_winid| and |v:mouse_win|.
@@ -4062,17 +4090,9 @@ getcharsearch() *getcharsearch()*
40624090
Return type: dict<any>
40634091

40644092

4065-
getcharstr([{expr}]) *getcharstr()*
4066-
Get a single character from the user or input stream as a
4067-
string.
4068-
If {expr} is omitted, wait until a character is available.
4069-
If {expr} is 0 or false, only get a character when one is
4070-
available. Return an empty string otherwise.
4071-
If {expr} is 1 or true, only check if a character is
4072-
available, it is not consumed. Return an empty string
4073-
if no character is available.
4074-
Otherwise this works like |getchar()|, except that a number
4075-
result is converted to a string.
4093+
getcharstr([{expr} [, {opts}]]) *getcharstr()*
4094+
The same as |getchar()|, except that this always returns a
4095+
String, and "number" isn't allowed in {opts}.
40764096

40774097
Return type: |String|
40784098

@@ -12730,6 +12750,7 @@ gui_win32s idem, and Win32s system being used (Windows 3.1)
1273012750
haiku Haiku version of Vim.
1273112751
hangul_input Compiled with Hangul input support. |hangul|
1273212752
hpux HP-UX version of Vim.
12753+
hurd GNU/Hurd version of Vim
1273312754
iconv Can use iconv() for conversion.
1273412755
insert_expand Compiled with support for CTRL-X expansion commands in
1273512756
Insert mode. (always true)

0 commit comments

Comments
 (0)