10.4.2 補完コマンド

以下は補完が使えるときに、ミニバッファーで定義されている補完コマンドの一覧です。

TAB

Complete the text in the minibuffer as much as possible; if unable to complete, display a list of possible completions.

SPC

Complete up to one word from the minibuffer text before point.

C-x UP

Complete the text in the minibuffer using minibuffer history.

C-x DOWN

Complete the text in the minibuffer using minibuffer defaults.

RET

Submit the text in the minibuffer as the argument, possibly completing first. See 補完の終了.

?

補完候補の一覧と便利なキーバインディングをいくつか表示します(minibuffer-completion-help)。

M-DOWN
M-UP

Navigate through list of completions.

M-v
M-g M-c
PageUp
prior

While in the minibuffer, select the window showing the completion list.

RET

In the completions buffer, choose the completion at point.

mouse-1
mouse-2

In the completions buffer, choose the completion at mouse click.

TAB
RIGHT
n

In the completions buffer, move to the following completion candidate.

S-TAB
LEFT
p

In the completions buffer, move to the previous completion candidate.

q

Quit the completions window and switch to the minibuffer window.

z

Kill the completions buffer and delete the window showing it.

TAB (minibuffer-complete)は、もっとも基本的な補完コマンドです。これはミニバッファーのテキストとマッチする可能性のある、すべての補完候補を検索して、できるかぎりの補完を試みます。補完候補が選択される方法については、補完候補が選択される方法を参照してください。

SPC (minibuffer-complete-word) completes like TAB, but only up to the next hyphen or space. If you have ‘auto-f’ in the minibuffer and type SPC, it finds that the completion is ‘auto-fill-mode’, but it only inserts ‘ill-’, giving ‘auto-fill-’. Another SPC at this point completes all the way to ‘auto-fill-mode’. This command is not available for arguments that often include spaces, such as file names.

TABSPCが補完できなければッチする補完候補のリスト(複数ある場合)、および補完候補の選択に役に立つコマンドをいくつかを別のウィンドウに表示します。これと同じ補完リストとヘルプは? (minibuffer-completion-help)でも表示できます。以下は補完一覧で使うことができるコマンドです:

While in the minibuffer or in the completion list buffer, M-DOWN (minibuffer-next-completion and M-UP (minibuffer-previous-completion) navigate through the completions displayed in the completions buffer. When minibuffer-completion-auto-choose is non-nil (which is the default), using these commands also inserts the current completion candidate into the minibuffer. If minibuffer-completion-auto-choose is nil, you can use the M-RET command (minibuffer-choose-completion) to insert the completion candidates into the minibuffer. By default, that exits the minibuffer, but with a prefix argument, C-u M-RET inserts the currently active candidate without exiting the minibuffer.

ミニバッファーでM-vを入力すると、候補リストを表示しているウィンドウを選択します(switch-to-completions)。以下のコマンドを使うには、この方法がよいでしょう。PageUpprior、およびM-g M-cは同じことをおこないます。他の方法でもウィンドウを選択できます(複数ウィンドウを参照)。

While in the completion list buffer, RET chooses the completion candidate at point (choose-completion) and mouse-1 and mouse-2 choose the completion at mouse click. With a prefix argument, C-u RET inserts the completion at point into the minibuffer, but doesn’t exit the minibuffer—thus, you can change your mind and choose another candidate.

While in the completion list buffer, you can use TAB, RIGHT, or n to move point to the following completion candidate (next-completion). You can also use S-TAB, LEFT, and p to move point to the previous completion alternative (previous-completion).

You can also complete using the history of minibuffer inputs for the command which prompted you. C-x UP (minibuffer-complete-history) works like TAB, but completes using minibuffer history instead of the usual completion candidates. A similar command C-x DOWN (minibuffer-complete-defaults) completes using the default input items provided by the prompting command.

Finally, q quits the window showing it and selects the window showing the minibuffer (quit-window), and z kills the completion buffer and delete the window showing it (kill-current-buffer).

変数minibuffer-visible-completionsが非minibuffer-visible-completions値にカスタマイズされていれば、矢印キーにバインドされているコマンドを変更します。同様にRETは通常M-RETが行うように、カレント候補を選択します。C-gは補完ウィンドウを非表示にしますが、ミニバッファーはアクティブのまま残すので、プロンプトでのタイプ入力を継続できます。


This page has generated for branch:work/emacs-30_8ac894e2246f25d2a2a97d866b10e6e0b0fede5a, commit:b7b3c5b81a7a4eec61faa3ed3d7c731d52d3987b to check Japanese translation.