(setq ivy-sort-matches-functions-alist '((t . ivy--prefix-sort)))
If I am in a directory with files
multiword.txt and am using
counsel-find-file, I start typing
m. The files are sorted alphabetically, with
mc_multiword both first in the list (it's alphabetically earliest) and selected (with a highlighting face).
I then type
u. It resorts so that
multiword.txt is first (I believe this is thanks to the
mc_multiword.txt remains selected. This means that when I hit
RETURN I get the longer (and usually unintended)
mc_multiword.txt file opened rather than the file with the name that is shorter and has my typed characters as a prefix of its name.
I realise that I can change the selection manually and get the desired file to open, but it's annoying to have what vanilla
find-file would get me precluded.
Is there a configuration option that would give me the behavior I want?