I'd like to use something like ido-completing-read
in the minibuffer, but on a per-word basis. Here is an example. If I provide a list ("tag:important " "tag:work" "subject" "from")
, I'd like to be able to type any word, but each time a word match (fuzzyly) some elements of the list, I can select it using the TAB
key, and continue typing until I'm happy and I type enter.
Demo: (the proposed words are in {}
, the typed text is on the left part, each line is a key-strock after the last one):
Beginning, empty line
{tag:important |tag:work |subject|from}
Type "tag", the useless proposition are removed:
tag{tag:important |tag:work}
Type "liatelle", nothing match this word so nothing is proposed...
tagliatelle{}
... until I press space an start a new word:
tagliatelle {tag:important |tag:work |subject|from}
continue to type "AND tag":
tagliatelle AND tag{tag:important |tag:work}
now I press TAB
to validate the first proposition (or cycle with C-s
)
tagliatelle AND tag[TAB]{tag:important |tag:work}
the first proposition is took:
tagliatelle AND tag:important {tag:important |tag:work |subject|from}
Finally, type "ENTER" to validate: the output is tagliatelle AND tag:important
Thank you!