Next: MixedCase Words, Previous: Hideshow minor mode, Up: Editing Programs [Contents][Index]
Completion is normally done in the minibuffer (see Completion), but you can also complete symbol names in ordinary Emacs buffers.
In most programming language modes, C-M-i (or
M-TAB16) invokes the command completion-at-point
, which generates the
list of possible completions for the symbol at point. This command
uses the available support facilities to come up with the completion
candidates:
In all other respects, in-buffer symbol completion behaves like minibuffer completion. For instance, if Emacs cannot complete to a unique symbol, it displays a list of completion alternatives in another window. Then you can use the keys M-DOWN and M-UP to navigate through the completions displayed in the completions buffer without leaving the original buffer, and the key M-RET to insert the currently highlighted completion to the buffer. See Completion.
In Text mode and related modes, M-TAB completes words based on the spell-checker’s dictionary. See Checking and Correcting Spelling.
Completion Preview mode is a minor mode that shows completion suggestions as you type. You can enable it for the current buffer with M-x completion-preview-mode, or globally with M-x global-completion-preview-mode. When Completion Preview mode is on, Emacs automatically displays the suggested completion for text around point as an in-line preview right after point; type TAB to accept the suggestion.
On graphical displays, the M-TAB key is usually reserved by the window manager for switching graphical windows, so you should type C-M-i or ESC TAB instead.
Next: MixedCase Words, Previous: Hideshow minor mode, Up: Editing Programs [Contents][Index]