Question

Currently, in C-mode, if I start typing a word such as:

namespace_module_

dabbrev-expand will cycle through a million full completions of this identifier...

namespace_module_typea_foo <TAB>
namespace_module_typea_bar <TAB>
namespace_module_typea_goo_start <TAB>
...

With many possible words, it is tedious to navigate through all of these. However, minibuffer completion seems to work differently. It only completes until the first difference among the possible matches. It would have completed to (assuming there were no other matches to something like typeb_, etc):

namespace_module_typea_

At this point, I need only type one character to remove the ambiguity, and it is very likely that autocompletion's next guess will be correct. Is it possible to use this completion mode in-buffer with dabbrev-expand? Or hippie-expand? Or even icicles? I've not been able to find anything.

Was it helpful?

Solution

Have you tried dabbrev-completion (bound to C-M-/ by default)? It should do just what you're asking.

OTHER TIPS

Yes, icicle-dabbrev-completion, which by default is bound to C-M-/ (replacing dabbrev-completion) gives you what dabbrev-completion gives you, but with Icicles completion features whenever there is more than one completion. IOW, you can match using a substring, regexp etc.; you can use progressive completion; you can sort and cycle candidates; and so on.

See the doc about this, here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top