|
3 | 3 | helpname: 'options' |
4 | 4 | --- |
5 | 5 | <div id='vimCodeElement'> |
6 | | -<a class="Constant" href="options.html" name="options.txt">options.txt</a> For <span class="Identifier">Vim バージョン 9.1.</span> Last change: 2024 Oct 22<br> |
| 6 | +<a class="Constant" href="options.html" name="options.txt">options.txt</a> For <span class="Identifier">Vim バージョン 9.1.</span> Last change: 2024 Nov 06<br> |
7 | 7 | <br> |
8 | 8 | <br> |
9 | 9 | <span class="Identifier">VIMリファレンスマニュアル by Bram Moolenaar</span><br> |
|
474 | 474 | れない。<br> |
475 | 475 | <br> |
476 | 476 | <a class="Constant" href="options.html#option-value-function" name="option-value-function">option-value-function</a><br> |
477 | | -いくつかのオプション(<a class="Type" href="options.html#'completefunc'">'completefunc'</a>, <a class="Type" href="options.html#'imactivatefunc'">'imactivatefunc'</a>, <a class="Type" href="options.html#'imstatusfunc'">'imstatusfunc'</a>,<br> |
478 | | -<a class="Type" href="options.html#'omnifunc'">'omnifunc'</a>, <a class="Type" href="options.html#'operatorfunc'">'operatorfunc'</a>, <a class="Type" href="options.html#'quickfixtextfunc'">'quickfixtextfunc'</a>, <a class="Type" href="options.html#'tagfunc'">'tagfunc'</a>, <a class="Type" href="options.html#'thesaurusfunc'">'thesaurusfunc'</a>)は<br> |
479 | | -関数名もしくは関数への参照もしくはラムダ関数を設定する。ラムダを使う場合は内部<br> |
480 | | -名へ変換される、例えば "<span class="Special"><lambda></span>123"。例:<br> |
| 477 | +いくつかのオプション (<a class="Type" href="options.html#'completefunc'">'completefunc'</a>, <a class="Type" href="options.html#'findfunc'">'findfunc'</a>, <a class="Type" href="options.html#'imactivatefunc'">'imactivatefunc'</a>,<br> |
| 478 | +<a class="Type" href="options.html#'imstatusfunc'">'imstatusfunc'</a>, <a class="Type" href="options.html#'omnifunc'">'omnifunc'</a>, <a class="Type" href="options.html#'operatorfunc'">'operatorfunc'</a>, <a class="Type" href="options.html#'quickfixtextfunc'">'quickfixtextfunc'</a>, <a class="Type" href="options.html#'tagfunc'">'tagfunc'</a><br> |
| 479 | +および <a class="Type" href="options.html#'thesaurusfunc'">'thesaurusfunc'</a>) は関数名もしくは関数への参照もしくはラムダ関数を設定す<br> |
| 480 | +る。ラムダを使う場合は内部名へ変換される、例えば "<span class="Special"><lambda></span>123"。<br> |
| 481 | +例:<br> |
481 | 482 | <br> |
482 | 483 | <div class="helpExample"> set opfunc=MyOpFunc<br> |
483 | 484 | set opfunc=function('MyOpFunc')<br> |
|
3543 | 3544 | 英数字、'-'、'_' のみ使用できる。<br> |
3544 | 3545 | <br> |
3545 | 3546 | <a class="Constant" href="options.html#'fillchars'" name="'fillchars'">'fillchars'</a> <a class="Constant" href="options.html#'fcs'" name="'fcs'">'fcs'</a><br> |
3546 | | -<a class="Type" href="options.html#'fillchars'">'fillchars'</a> <a class="Type" href="options.html#'fcs'">'fcs'</a> 文字列 (既定では "vert:|,fold:-,eob:~")<br> |
| 3547 | +<a class="Type" href="options.html#'fillchars'">'fillchars'</a> <a class="Type" href="options.html#'fcs'">'fcs'</a> 文字列 (既定では "vert:|,fold:-,eob:~,lastline:@")<br> |
3547 | 3548 | グローバル/ウィンドウについてローカル <a class="Identifier" href="options.html#global-local">global-local</a><br> |
3548 | 3549 | ウィンドウのステータス行、垂直分割の区切り、特殊行を埋める文字。<br> |
3549 | 3550 | これはコンマで区切られた項目のリストである。各項目には、名前、コロン、<br> |
|
3580 | 3581 | eob EndOfBuffer <a class="Identifier" href="syntax.html#hl-EndOfBuffer">hl-EndOfBuffer</a><br> |
3581 | 3582 | lastline NonText <a class="Identifier" href="syntax.html#hl-NonText">hl-NonText</a><br> |
3582 | 3583 | <br> |
3583 | | - <a class="Constant" href="options.html#'findexpr'" name="'findexpr'">'findexpr'</a> <a class="Constant" href="options.html#'fexpr'" name="'fexpr'">'fexpr'</a> <a class="Constant" href="options.html#E1514" name="E1514">E1514</a><br> |
3584 | | -<a class="Type" href="options.html#'findexpr'">'findexpr'</a> <a class="Type" href="options.html#'fexpr'">'fexpr'</a> 文字列 (既定では "")<br> |
| 3584 | + <a class="Constant" href="options.html#'findfunc'" name="'findfunc'">'findfunc'</a> <a class="Constant" href="options.html#'ffu'" name="'ffu'">'ffu'</a> <a class="Constant" href="options.html#E1514" name="E1514">E1514</a><br> |
| 3585 | +<a class="Type" href="options.html#'findfunc'">'findfunc'</a> <a class="Type" href="options.html#'ffu'">'ffu'</a> 文字列 (既定では "")<br> |
3585 | 3586 | グローバル/バッファについてローカル <a class="Identifier" href="options.html#global-local">global-local</a><br> |
3586 | 3587 | <span class="Special">{</span><a class="Identifier" href="various.html#+eval">+eval</a><span class="Special"> 機能つきでコンパイルされたときのみ有効}</span><br> |
3587 | | - <a class="Identifier" href="editing.html#:find">:find</a> コマンドのファイル名を取得するために評価される式。このオプショ<br> |
3588 | | - ンが空の場合、内部の <a class="Identifier" href="editing.html#file-searching">file-searching</a> メカニズムが使用される。<br> |
| 3588 | + <a class="Identifier" href="editing.html#:find">:find</a> コマンドのファイル名を取得するために呼び出される関数。このオプ<br> |
| 3589 | + ションが空の場合、内部の <a class="Identifier" href="editing.html#file-searching">file-searching</a> メカニズムが使用される。<br> |
3589 | 3590 | <br> |
3590 | | - 式の評価中、<a class="Identifier" href="eval.html#v:fname">v:fname</a> 変数は <a class="Identifier" href="editing.html#:find">:find</a> コマンドの引数に設定される。<br> |
| 3591 | + 値には関数名、<a class="Identifier" href="eval.html#lambda">lambda</a> または <a class="Identifier" href="eval.html#Funcref">Funcref</a> を指定できる。<br> |
| 3592 | + 詳細については <a class="Identifier" href="options.html#option-value-function">option-value-function</a> を参照。<br> |
3591 | 3593 | <br> |
3592 | | - 式は、<a class="Identifier" href="editing.html#:find">:find</a> コマンドの呼び出しごとに 1 回だけ評価される。<br> |
3593 | | - 式は、<a class="Type" href="options.html#'path'">'path'</a> で指定されたすべてのディレクトリを処理できる。<br> |
| 3594 | + 関数は 2 つの引数で呼び出される。最初の引数は <a class="Identifier" href="eval.html#String">String</a> で、<a class="Identifier" href="editing.html#:find">:find</a> コ<br> |
| 3595 | + マンドの引数である。2 番目の引数は <a class="Identifier" href="eval.html#Boolean">Boolean</a> で、関数が呼び出されて<br> |
| 3596 | + <a class="Identifier" href="editing.html#:find">:find</a> コマンドのコマンドライン補完にマッチしたリストを取得した時に<br> |
| 3597 | + <a class="Identifier" href="eval.html#v:true">v:true</a> に設定される。<br> |
| 3598 | + 関数は文字列のリストを返す必要がある。<br> |
3594 | 3599 | <br> |
3595 | | - マッチした場合、式は 1 つ以上のファイル名を含む <a class="Identifier" href="eval.html#List">List</a> を返す必要があ<br> |
3596 | | - る。マッチしない場合、式は空のリストを返す必要がある。<br> |
| 3600 | + 関数は、<a class="Identifier" href="editing.html#:find">:find</a> コマンドの呼び出しごとに 1 回だけ呼び出される。<br> |
| 3601 | + 関数は、<a class="Type" href="options.html#'path'">'path'</a> で指定されたすべてのディレクトリを処理できる。<br> |
3597 | 3602 | <br> |
3598 | | - 式の評価中にエラーが発生した場合、空のリストが戻り値として使用される。<br> |
| 3603 | + マッチした場合、関数は 1 つ以上のファイル名を含む <a class="Identifier" href="eval.html#List">List</a> を返す必要が<br> |
| 3604 | + ある。マッチしない場合、関数は空のリストを返す必要がある。<br> |
3599 | 3605 | <br> |
3600 | | - 引数なしの関数呼び出しを使用すると高速になる <a class="Identifier" href="vim9.html#expr-option-function">expr-option-function</a><br> |
| 3606 | + 関数の呼び出し中にエラーが発生した場合、空のリストが戻り値として使用さ<br> |
| 3607 | + れる。<br> |
3601 | 3608 | <br> |
3602 | | - <a class="Type" href="options.html#'findexpr'">'findexpr'</a> の評価中にテキストを変更したり、別のウィンドウにジャンプし<br> |
| 3609 | + <a class="Type" href="options.html#'findfunc'">'findfunc'</a> の実行中にテキストを変更したり、別のウィンドウにジャンプし<br> |
3603 | 3610 | たりすることはできない。<a class="Identifier" href="eval.html#textlock">textlock</a><br> |
3604 | 3611 | <br> |
3605 | 3612 | セキュリティ上の理由から、このオプションを <a class="Identifier" href="options.html#modeline">modeline</a> または <a class="Identifier" href="eval.html#sandbox">sandbox</a><br> |
|
3608 | 3615 | 例:<br> |
3609 | 3616 | <br> |
3610 | 3617 | <div class="helpExample"> " glob() を使う<br> |
3611 | | - func FindExprGlob()<br> |
3612 | | - return glob(v:fname, v:false, v:true)<br> |
| 3618 | + func FindFuncGlob(cmdarg, cmdcomplete)<br> |
| 3619 | + let pat = a:cmdcomplete ? $'{a:cmdarg}*' : a:cmdarg<br> |
| 3620 | + return glob(pat, v:false, v:true)<br> |
3613 | 3621 | endfunc<br> |
3614 | | - set findexpr=FindExprGlob()</div> |
| 3622 | + set findfunc=FindFuncGlob</div> |
3615 | 3623 | <br> |
3616 | 3624 | <div class="helpExample"> " 'git ls-files' の出力を使う<br> |
3617 | | - func FindGitFiles()<br> |
| 3625 | + func FindGitFiles(cmdarg, cmdcomplete)<br> |
3618 | 3626 | let fnames = systemlist('git ls-files')<br> |
3619 | | - return fnames->filter('v:val =~? v:fname')<br> |
| 3627 | + return fnames->filter('v:val =~? a:cmdarg')<br> |
3620 | 3628 | endfunc<br> |
3621 | | - set findexpr=FindGitFiles()</div> |
| 3629 | + set findfunc=FindGitFiles</div> |
3622 | 3630 | <br> |
3623 | 3631 | <a class="Constant" href="options.html#'fixendofline'" name="'fixendofline'">'fixendofline'</a> <a class="Constant" href="options.html#'fixeol'" name="'fixeol'">'fixeol'</a> <a class="Constant" href="options.html#'nofixendofline'" name="'nofixendofline'">'nofixendofline'</a> <a class="Constant" href="options.html#'nofixeol'" name="'nofixeol'">'nofixeol'</a><br> |
3624 | 3632 | <a class="Type" href="options.html#'fixendofline'">'fixendofline'</a> <a class="Type" href="options.html#'fixeol'">'fixeol'</a> 切替 (既定ではオン)<br> |
|
0 commit comments