Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
50 changes: 34 additions & 16 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: 2025 Sep 08
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Sep 18


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -632,7 +632,7 @@ settagstack({nr}, {dict} [, {action}])
数値 {dict}を使ってタグスタックを変更
setwinvar({nr}, {varname}, {val}) なし ウィンドウ{nr}の変数{varname}に{val}を
セット
sha256({string}) 文字列 {string}のSHA256チェックサム
sha256({expr}) 文字列 文字列または Blob のSHA256チェックサム
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sha256({expr}) 文字列 文字列または Blob のSHA256チェックサム
sha256({expr}) 文字列 文字列または Blob の SHA256 チェックサム

としてもいいかなと

shellescape({string} [, {special}])
文字列 {string}をシェルコマンド引数として使う
ためにエスケープする。
Expand Down Expand Up @@ -1965,10 +1965,10 @@ col({expr} [, {winid}]) *col()*


complete({startcol}, {matches}) *complete()* *E785*
挿入モード補完の候補を設定する
挿入モードでのみ使用できる。CTRL-R = (|i_CTRL-R| を参照)と組み
合わせてマッピングを作る必要がある。CTRL-Oの後や、<expr>マッピ
ングの中では正しく動作しない
挿入モード補完のマッチを設定する。挿入モードでのみ使用できる
通常は CTRL-R = (|i_CTRL-R| を参照) のマッピングから呼び出され
る。ただし、|<Cmd>| または |<ScriptCmd>| マッピングからも呼び
出される。CTRL-O の後や式のマッピングでは機能しない
{startcol}は補完すべき単語の開始位置を示す、行内のバイトオフセッ
トである。その位置からカーソルまでのテキストが補完すべき単語と
なる。
Expand All @@ -1981,15 +1981,31 @@ complete({startcol}, {matches}) *complete()* *E785*
この関数で設定した候補は普通の挿入モード補完と同じ様にCTRL-Nと
CTRL-Pで選択できる。設定されていればポップアップメニューが表示
される。|ins-completion-menu|を参照。
例: >
inoremap <F5> <C-R>=ListMonths()<CR>

func ListMonths()
call complete(col('.'), ['January', 'February', 'March',
\ 'April', 'May', 'June', 'July', 'August', 'September',
\ 'October', 'November', 'December'])
return ''
endfunc
例 (旧来の Vim script を使用): >

inoremap <F5> <C-R>=ListMonths()<CR>

func ListMonths()
call complete(col('.'), ['January', 'February', 'March',
\ 'April', 'May', 'June', 'July', 'August',
\ 'September', \ 'October', 'November', 'December'])
return ''
endfunc
<
例 (Vim9 script を使用): >

vim9script
def ListMonths(): string
const months = [ 'January', 'February', 'March', 'April',
'May', 'June', 'July', 'September', 'October',
'November', 'December']
complete(col('.'), months)
return ''
enddef

inoremap <F5> <ScriptCmd>ListMonths()<CR>

< この例はそれほど役には立たないが、使い方を示している。Note 0が
挿入されてしまわないように空文字列を返していることに注意。

Expand Down Expand Up @@ -10115,11 +10131,13 @@ setwinvar({winnr}, {varname}, {val}) *setwinvar()*
戻り値の型: |Number|


sha256({string}) *sha256()*
{string}のSHA256チェックサムを64文字の16進文字列で返す。
sha256({expr}) *sha256()*
{expr} のSHA256チェックサムを64文字の16進文字列で返す。
{expr} は文字列または Blob である。

|method| としても使用できる: >
GetText()->sha256()
GetBlob()->sha256()
<
戻り値の型: |String|

Expand Down
51 changes: 35 additions & 16 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: 2025 Sep 08
*builtin.txt* For Vim version 9.1. Last change: 2025 Sep 18


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -575,7 +575,7 @@ settabwinvar({tabnr}, {winnr}, {varname}, {val})
settagstack({nr}, {dict} [, {action}])
Number modify tag stack using {dict}
setwinvar({nr}, {varname}, {val}) none set {varname} in window {nr} to {val}
sha256({string}) String SHA256 checksum of {string}
sha256({expr}) String SHA256 checksum of String or Blob
shellescape({string} [, {special}])
String escape {string} for use as shell
command argument
Expand Down Expand Up @@ -1913,10 +1913,11 @@ col({expr} [, {winid}]) *col()*


complete({startcol}, {matches}) *complete()* *E785*
Set the matches for Insert mode completion.
Can only be used in Insert mode. You need to use a mapping
with CTRL-R = (see |i_CTRL-R|). It does not work after CTRL-O
or with an expression mapping.
Set the matches for Insert mode completion. Can only be
used in Insert mode. Typically invoked from a mapping with
CTRL-R = (see |i_CTRL-R|), but may also be called from a
|<Cmd>| or |<ScriptCmd>| mapping. It does not work after
CTRL-O or with an expression mapping.
{startcol} is the byte offset in the line where the completed
text start. The text up to the cursor is the original text
that will be replaced by the matches. Use col('.') for an
Expand All @@ -1930,15 +1931,31 @@ complete({startcol}, {matches}) *complete()* *E785*
The match can be selected with CTRL-N and CTRL-P as usual with
Insert mode completion. The popup menu will appear if
specified, see |ins-completion-menu|.
Example: >
inoremap <F5> <C-R>=ListMonths()<CR>

func ListMonths()
call complete(col('.'), ['January', 'February', 'March',
\ 'April', 'May', 'June', 'July', 'August', 'September',
\ 'October', 'November', 'December'])
return ''
endfunc
Example (using legacy Vim script): >

inoremap <F5> <C-R>=ListMonths()<CR>

func ListMonths()
call complete(col('.'), ['January', 'February', 'March',
\ 'April', 'May', 'June', 'July', 'August',
\ 'September', \ 'October', 'November', 'December'])
return ''
endfunc
<
Example (using Vim9 script): >

vim9script
def ListMonths(): string
const months = [ 'January', 'February', 'March', 'April',
'May', 'June', 'July', 'September', 'October',
'November', 'December']
complete(col('.'), months)
return ''
enddef

inoremap <F5> <ScriptCmd>ListMonths()<CR>

< This isn't very useful, but it shows how it works. Note that
an empty string is returned to avoid a zero being inserted.

Expand Down Expand Up @@ -10319,12 +10336,14 @@ setwinvar({winnr}, {varname}, {val}) *setwinvar()*
Return type: |Number|


sha256({string}) *sha256()*
sha256({expr}) *sha256()*
Returns a String with 64 hex characters, which is the SHA256
checksum of {string}.
checksum of {expr}.
{expr} is a String or a Blob.

Can also be used as a |method|: >
GetText()->sha256()
GetBlob()->sha256()
<
Return type: |String|

Expand Down