I LOVE Kakoune’s default “fuzzy” searching of files in the prompt completions. However, I find opening the suggested file completely counter-intuitive.
Let’s say I have open buffers called
some.component.html (and others). I can type
:b somehtml and it will filter down to
some.component.html, with that file showing as selected. The prompt in this case still shows
:b somehtml. When I press
<ret> it opens the
some.component.html buffer. Perfect, just what I’d expect.
Let’s say now I need to edit another file called
some.component.spec.ts that is not currently open in a buffer. I now type
:e somespec, see the list filter down to my file (which is NOT selected this time), but because of the
:b behavior, I just press
<ret> without thinking. It then creates a NEW buffer called
What I would expect:
I would expect the
:e be consistent with
:b, that is, as I’m tying it automatically selects the top file in the list and when I press
<ret> it opens that file rather than just creating a new buffer.
If I’m actually creating a new file, since it has to be unique, there should be no suggestions remaining by the time I’m done typing. In that case, I would expect a new buffer.
Is there a reason for this inconsistency? Are there any examples that prove my above assertion untrue? Is there, or would it be possible to have a plugin to implement this behavior or is this something that can only be done in Kakoune itself?