Preselect current buffer when CommandTBuffer is used with no filter string
I find CommandTBuffer very useful for simple navigation through all open buffers. If the number of buffers is relatively small then often I don't even bother with entering a filter string. Instead, I just navigate to the buffer I want with the cursor keys and select it via <Enter>.
One thing that I find a little bit disorientating is that, when looking at the CommandTBuffer window, there is no visual indication of which buffer is currently open in the window I was working in.
I think it would be a great feature if at those times when the filter string is empty, CommandTBuffer could place the cursor on the buffer currently viewed in the working window, rather then placing it at the top of the list of all open buffers.
I realise that this workflow might not suite everyone, but maybe it is possible to implement this as an optional feature?
It's an interesting idea. My first instinct is to push back a little because it will add complexity to the code base[*], and would add an inconsistency in the mental model (all other listings are sorted by "rank" order, which means items are ranked according to how well they match the search string, and in the event of a tie — which is what happens when there is no search string, for example — then we sort by alphabetical order secondarily, and the top/best match is the one that is initially selected).
[*]: In addition to code complexity, we need to be sure that this won't interact in strange ways with other possible features to produce even more UI/conceptual complexity (see https://github.com/wincent/command-t/issues/107, for example, which is a proposal to tweak the order in which some items are displayed).
So, I'm inclined to leave this ticket open to give other people (or you) a chance to comment further, but for now this isn't something that I personally would have much interest in implementing.
Hmm… I see your dilemma… Let me dwell on this a bit more and I'll get back to you
Given the big rewrite for v6.0.x, I'm closing all older issues as there is unlikely to be anything significant happening on the 5-x-devel branch from here on[^patches]. Feedback issue for 6.0.x is here:
- https://github.com/wincent/command-t/issues/393
[^patches]: Patches and PRs would be welcome, but my personal efforts are going to be directed towards main.