Next: , Previous: Obtaining and Installing, Up: Top

3 Quick-Start

This “Quick-Start” describes the default behaviour. However, predictive completion mode can be heavily customized, allowing its behaviour to be radically changed. The many and various predictive completion mode customization options can be found in the predictive and completion-ui customization groups. If you like the idea of predictive completion, but don't like the way it works “out-of-the-box” the rest of this manual explains all the options and features in detail.

Use the predictive-mode command to switch the predictive minor-mode on. The same command will also switch it off again. This section only covers (some of) the default behaviour of predictive-mode. The way that predictive-mode works can be radically changed via numerous customization options, which are described in detail in the rest of this manual. As you add characters to a word, predictive mode searches in a dictionary for words starting with those characters. There are a number of different ways to choose which word (if any) should be used to complete what you've typed.

The most likely completion is provisionally inserted in the buffer after the point, and highlighted to indicate that it has not yet been accepted. The most likely completion is updated as you add more characters to the word. Use C-RET to accept a completion. See Dynamic Completion, for details. What if you don't want to use the most likely completion? As you type, a list of the ten most likely completions is displayed in the echo area and, after a short delay, in a tooltip. They are ranked according to likelihood. Typing a number 09 will insert the corresponding completion. See Completion Hotkeys, Displaying Completions in the Echo Area, and Completion Tooltip for details. You can also display the completion tooltip manually, using S-down. When the tooltip is displayed, the up and down keys can be used to select a completion from the list in tooltip. You can cycle forwards and backwards through the available completions even when the tooltip isn't displayed, using M-TAB or M-/ and M-SHIFT-TAB or M-?. As you cycle, the next completion is provisionally inserted after the point and highlighted. C-RET accepts the completion, as usual. Hitting TAB whilst completing will perform traditional “tab-completion” on the word: the word will be completed up to the longest common prefix of the available completions. Another useful command is C-TAB. This accepts all the characters from the current provisional completion as though you typed them yourself, and re-completes the resulting, longer string — useful if a word just needs a suffix adding, for instance. See Basic Completion Commands, for details of cycling and tab-completion. M-Down will display a menu from which you can select a completion (see Completion Menu and Browser). There is also a ‘Browser’ menu item, which brings up the completion browser. This hierarchically lists all possible completions, not just the most likely ones. (It can sometimes take a while to construct the completion browser, but you can hit C-g at any time to cancel it). See Completion Menu and Browser, for details. C-Down displays a pop-up frame, in which you can use the usual Emacs motion keys to select a completion. M-Tab or M-/ in the pop-up frame toggles between displaying the most likely completions and displaying all possible completions. To get rid of the pop-up frame, use C-Up. The predictive completion package comes with an English dictionary, which is used by default. However, this is only really included to make sure everything works “out of the box”. This default dictionary has already been trained on a large body of English text, which means it will take a very long time to adapt to your individual writing style. Don't expect predictive completion mode to display particularly good predictive powers if you stick to the default dictionary! For much better results, you should create your own dictionary (based on the supplied one if you like), and train it on samples of your own writing. See Dictionaries.