Skip to content

Update builtin.{txt,jax} #1548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 55 additions & 33 deletions doc/builtin.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*builtin.txt* For Vim バージョン 9.1. Last change: 2024 May 05
*builtin.txt* For Vim バージョン 9.1. Last change: 2024 May 18


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -281,6 +281,8 @@ getreg([{regname} [, 1 [, {list}]]])
getreginfo([{regname}]) 辞書 レジスタについての情報
getregion({pos1}, {pos2} [, {opts}])
リスト {pos1}から{pos2}までのテキストを取得
getregionpos({pos1}, {pos2} [, {opts}])
リスト 領域の位置のリストを取得
getregtype([{regname}]) 文字列 レジスタの種類を取得
getscriptinfo([{opts}]) リスト 読み込まれたスクリプトの一覧
gettabinfo([{expr}]) リスト タブページのリスト
Expand Down Expand Up @@ -4214,6 +4216,34 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()*
|method| としても使用できる: >
GetRegname()->getreg()

getreginfo([{regname}]) *getreginfo()*
レジスタ {regname} についての詳細情報として次の項目を持つ辞書
を返す:
regcontents レジスタ {regname} に格納されている行
の、|getreg|({regname}, 1, 1) と同様の
リスト。
regtype レジスタ {regname} の |getregtype()|
相当の種別。
isunnamed 真偽値フラグ、v:true は現在指している
レジスタが無名レジスタであることを示
す。
points_to 無名レジスタであれば、現在指しているレ
ジスタを示す単一文字 (|quotequote|を参
照)。
例えば、行を `dd` で削除後、このフィー
ルドは "1" となりそのレジスタには削除
したテキストが入る。

引数 {regname} は文字列。{regname} が不正なレジスタ名もしくは
未設定の場合、空の辞書が返される。{regname} が "" か "@" の場
合、無名レジスタ '"' が使われる。
{regname} が未指定の場合、|v:register| が使われる。
戻り値の辞書は |setreg()| に渡すことができる。
|Vim9-script| では {regname} は1文字でなくてはならない。

|method| としても使用できる: >
GetRegname()->getreginfo()

getregion({pos1}, {pos2} [, {opts}]) *getregion()*
バッファから、{pos1} から {pos2} までの文字列のリストを返す。

Expand Down Expand Up @@ -4265,34 +4295,23 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()*
|method| としても使用できる: >
getpos('.')->getregion(getpos("'a"))
<
getreginfo([{regname}]) *getreginfo()*
レジスタ {regname} についての詳細情報として次の項目を持つ辞書
を返す:
regcontents レジスタ {regname} に格納されている行
の、|getreg|({regname}, 1, 1) と同様の
リスト。
regtype レジスタ {regname} の |getregtype()|
相当の種別。
isunnamed 真偽値フラグ、v:true は現在指している
レジスタが無名レジスタであることを示
す。
points_to 無名レジスタであれば、現在指しているレ
ジスタを示す単一文字 (|quotequote|を参
照)。
例えば、行を `dd` で削除後、このフィー
ルドは "1" となりそのレジスタには削除
したテキストが入る。

引数 {regname} は文字列。{regname} が不正なレジスタ名もしくは
未設定の場合、空の辞書が返される。{regname} が "" か "@" の場
合、無名レジスタ '"' が使われる。
{regname} が未指定の場合、|v:register| が使われる。
戻り値の辞書は |setreg()| に渡すことができる。
|Vim9-script| では {regname} は1文字でなくてはならない。
getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()*
|getregion()| と同じだが、{pos1} と {pos2} によって囲まれたバッ
ファのテキストセグメントを表す位置のリストを返す。
セグメントは、各行の位置のペアである: >
[[{start_pos}, {end_pos}], ...]
<
位置は 4 つの数値の |List| である:
[bufnum, lnum, col, off]
"bufnum" はバッファ番号。
"lnum" と "col" はバッファ内の位置。最初の桁は 1 である。
'virtualedit' が使用されない限り、"off" の数値はゼロである。次
に、それは文字の先頭からの画面桁のオフセットになる。例えば、
<Tab> 内または最後の文字の後の位置である。

|method| としても使用できる: >
GetRegname()->getreginfo()

getpos('.')->getregionpos(getpos("'a"))
<
getregtype([{regname}]) *getregtype()*
レジスタ{regname}の種類を表す文字列を返す。
戻り値は次のいずれかとなる:
Expand Down Expand Up @@ -8764,10 +8783,12 @@ shellescape({string} [, {special}]) *shellescape()*
にする。そうでなければ、{string}をシングルクォートで囲み、"'"
を"'\''" で置き換える。

{special} が指定され、0 でない数値または空でない文字列の場合
(|non-zero-arg|)、"!", "%", "#", "<cword>" などの特殊なアイテ
ムの前にはバックスラッシュがつく。コマンド |:!| によってその
バックスラッシュは再び除かれる。
{special} 引数は、Vim コマンドで使用されるキーワードのエスケー
プを追加する。これが省略されずに、ゼロ以外の数値または空ではな
い文字列の場合 (|non-zero-arg|) 、"!", "%", "#", "<cword>" な
どの特殊な項目 (|expand()| にリストされている) の前にバックス
ラッシュが付く。このバックスラッシュは |:!| コマンドによって再
び削除される。

'shell' の値の末尾が "csh" である場合、{special} が
|non-zero-arg| ならば "!" の文字もエスケープされる。これは、
Expand Down Expand Up @@ -9974,8 +9995,9 @@ tempname() *tempname()* *temp-file-name*
の呼出しまでは違う名前を生成することが保証される。例: >
:let tmpfile = tempname()
:exe "redir > " .. tmpfile
< Unix では、ファイルはプライベートなディレクトリに置かれる。
|tempfile|
< Unix では、ファイルはプライベートディレクトリ |tempfile| にあ
る。これは Vim の終了時に再帰的に削除されるが、他のシステムで
は、一時ファイルは終了時に自動的にクリーンアップされない。
MS-Windowsでは、'shellslash' がオンのときか、'shellcmdflag' が
'-' で始まり 'shell' が powershell か pwsh を含まない時はスラッ
シュが使われる。
Expand Down
39 changes: 32 additions & 7 deletions en/builtin.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2024 May 05
*builtin.txt* For Vim version 9.1. Last change: 2024 May 18


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -265,6 +265,8 @@ getreg([{regname} [, 1 [, {list}]]])
getreginfo([{regname}]) Dict information about a register
getregion({pos1}, {pos2} [, {opts}])
List get the text from {pos1} to {pos2}
getregionpos({pos1}, {pos2} [, {opts}])
List get a list of positions for a region
getregtype([{regname}]) String type of a register
getscriptinfo([{opts}]) List list of sourced scripts
gettabinfo([{expr}]) List list of tab pages
Expand Down Expand Up @@ -4327,6 +4329,26 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()*
Can also be used as a |method|: >
getpos('.')->getregion(getpos("'a"))
<
getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()*
Same as |getregion()|, but returns a list of positions
describing the buffer text segments bound by {pos1} and
{pos2}.
The segments are a pair of positions for every line: >
[[{start_pos}, {end_pos}], ...]
<
The position is a |List| with four numbers:
[bufnum, lnum, col, off]
"bufnum" is the buffer number.
"lnum" and "col" are the position in the buffer. The first
column is 1.
The "off" number is zero, unless 'virtualedit' is used. Then
it is the offset in screen columns from the start of the
character. E.g., a position within a <Tab> or after the last
character.

Can also be used as a |method|: >
getpos('.')->getregionpos(getpos("'a"))
<
getregtype([{regname}]) *getregtype()*
The result is a String, which is type of register {regname}.
The value will be one of:
Expand Down Expand Up @@ -8969,11 +8991,12 @@ shellescape({string} [, {special}]) *shellescape()*
Otherwise it will enclose {string} in single quotes and
replace all "'" with "'\''".

When the {special} argument is present and it's a non-zero
Number or a non-empty String (|non-zero-arg|), then special
items such as "!", "%", "#" and "<cword>" will be preceded by
a backslash. This backslash will be removed again by the |:!|
command.
The {special} argument adds additional escaping of keywords
used in Vim commands. When it is not omitted and a non-zero
number or a non-empty String (|non-zero-arg|), then special
items such as "!", "%", "#" and "<cword>" (as listed in
|expand()|) will be preceded by a backslash.
This backslash will be removed again by the |:!| command.

The "!" character will be escaped (again with a |non-zero-arg|
{special}) when 'shell' contains "csh" in the tail. That is
Expand Down Expand Up @@ -10220,7 +10243,9 @@ tempname() *tempname()* *temp-file-name*
is different for at least 26 consecutive calls. Example: >
:let tmpfile = tempname()
:exe "redir > " .. tmpfile
< For Unix, the file will be in a private directory |tempfile|.
< For Unix, the file will be in a private directory |tempfile|
that is recursively deleted when Vim exits, on other systems
temporary files are not cleaned up automatically on exit.
For MS-Windows forward slashes are used when the 'shellslash'
option is set, or when 'shellcmdflag' starts with '-' and
'shell' does not contain powershell or pwsh.
Expand Down