| Previous: Icicles - Traversing Minibuffer Histories | Icicles | IciclesIndex | Next: Icicles - Expanded-Common-Match Completion |
Icicles offers a new way to complete your partial input in the minibuffer. Instead of considering the string of input characters to be the prefix of various complete names, you can look for names that match that string anywhere.
This is the single most important feature that Icicles offers.
This is similar in effect to using command ‘apropos’ to find “apropos completions” of a string (except it works also for file and buffer names), so that’s the term I use for this: apropos completion. The more correct characterization of this is that of the previous paragraph, however: names that match the given string.
Just as with prefix completion, Icicles lets you cycle among the apropos candidates. To do this, you use keys ‘next’ and ‘prior’ (labeled PageDown and PageUp on many keyboards). The root that was completed is underlined in the minibuffer completion candidate.
For example, suppose you use ‘M-x’ to enter a command. You do not remember the exact command name, but it has something to do with lines, so you type ‘M-x line’, then hit ‘next’ repeatedly until you see the right “line” command – ‘transpose-lines’, perhaps. Prefix completion cannot find this command, because “line” is not a prefix of “transpose-lines”.
Because ‘M-x’ expects a command name, only command names are inserted into the minibuffer as the apropos-completion candidates for ‘M-x’. Likewise, in other contexts, where names of other kinds of object are expected, apropos completion inserts only names of objects of the appropriate type. Prefix completion works the same way.
For example, using ‘next’ and ‘prior’ with ‘C-x b at’ lets you cycle through all buffers (such as ‘*scratch*’) that have “at” in their name – only buffer names appear as candidates.
As an alternative to using ‘next’ to cycle forward, you can hit ‘S-TAB’ (‘S-tab’) repeatedly. Similarly, for prefix completion you can repeat ‘TAB’ to cycle forward. See Prefix And Apropos Completion.
Apropos completion uses a regular expression (regexp) as its input string. You can type `M-x \bes’, for instance, to find commands with “es” at the start of a word within the command name (`\b’ matches the start of a word). It will find `eshell-test’ and `color-theme-blue-eshell’, but not ‘count-lines’ – “es” does not start a word in ‘count-lines’. Similarly, for file names, buffer names, and so on.
Prefix completion is actually a special case of apropos completion, where the regexp starts with “^”. (That is not how it is implemented, however.)
What if you want to see the list of all completion candidates that match the minibuffer input? Instead of cycling candidates blindly, just hit ‘S-TAB’ (Shift TAB) at any time to display the matching candidates in pop-up buffer ‘*Completions*’. This is analogous to ‘TAB’ for prefix completion.
(The documentation always refers to the key that performs apropos completion as ‘S-TAB’. Actually, it is ‘S-TAB’ only by default. You can customize it, using option `icicle-apropos-complete-keys’.)
Everything said in Icicles - Cycling Completions about the ‘*Completions*’ buffer for prefix completion is also true for apropos completion. It is updated to reflect the current set of matching candidates, and the current completion is highlighted. The root that was completed is highlighted within each candidate (first occurrence only). Root highlighting is more important in the case of apropos completion, because the match position is different in different candidates. In the case of apropos completion, the root is not the input string, taken literally, but the part of a candidate that the input matches. See Icicles - Completions Display for additional ways to use the minibuffer with ‘*Completions*’.
Regexp matching one of the most powerful features of Icicles. Enjoy! Explore! You can at any time switch back and forth between prefix completion (‘end’, ‘home’), apropos completion (‘next’, ‘prior’), and input history traversal (‘M-n’, ‘M-p’).
Here is a screenshot showing apropos completion and cycling in the minibuffer. It corresponds to input ‘M-x minib S-TAB’ followed by hitting ‘next’ several times.
This screenshot shows several Icicles features:
‘minib’ was completed to the expanded common match among all candidates, ‘minibuffer’ (not shown, because of subsequent candidate cycling).‘*Completions*’. What your input regexp matched (just ‘minib’ in this case) is highlighted in red in ‘*Completions*’.‘minibuffer’ in the minibuffer with one possible candidate: ‘insert-in-minibuffer’.‘*Completions*’.‘*Completions*’).See also:
‘*Completions*’| Previous: Icicles - Traversing Minibuffer Histories | Icicles | IciclesIndex | Next: Icicles - Expanded-Common-Match Completion |
DrewsElispLibraries referenced here: Lisp:icicles.el, Lisp:icomplete+.el
CategoryCommands CategoryCompletion CategoryRegexp CategoryDocumentation CategoryHelp CategoryProgrammerUtils