tabs.kak icon indicating copy to clipboard operation
tabs.kak copied to clipboard

Suggestion: A Command to to Temporarily Bind All Tabs to Keys for One Time

Open eeriemyxi opened this issue 1 year ago • 2 comments

This is a suggestion that's not particularly needed but can be quite a boost in productivity if you are used to it. You can close this issue if you don't feel like ever implementing it for any reason, but I thought I'd at least share the idea.

The idea is that when this new command is executed, it assigns each open buffer with a key from the alphabet. Let's say I have three buffers open:

  • apple.md
  • orange.md
  • tomato.md Now when this command is executed, it will assign each buffer with a key from a list of keys, like "qwerty", maybe. So, with that the buffers will look like this:
  • (q) apple.md
  • (w) orange.md
  • (e) tomato.md If the user presses q after triggering the command, it will focus on the apple.md buffer, for example. Then after a successful operation it removes the key assignments.

It'd be cooler if the keys were persistent for each execution for buffers. I think a custom little hash function with some collision handling on the buffer names for indexing the key list can do the job, that'd make it reasonably smart. But my DSA isn't too strong so I wouldn't really know (maybe it makes no sense at all).

eeriemyxi avatar Oct 26 '24 06:10 eeriemyxi

This is a cool idea. Thanks for the suggestion

enricozb avatar Oct 28 '24 10:10 enricozb

Had some ideas for alternatives, how about using number keys to jump to buffers as they are positionned on the tabs bar (akin to how one uses ctrl+num to do the same in web browsers). This could also be expedited à la kakoune by using the number param before the tabs mode input (aka 1b to hop to the first tab, 3b to the third, etc). Thoughts?

Gawidev avatar Aug 29 '25 21:08 Gawidev