navi
navi copied to clipboard
Table widget to select multiple predefined values as a table
Is your feature request related to a problem? Please describe. It's basically the makefile --enable/--disable feature matrix. I'd like to have it a in a single screen with defaults selected.
I can make defaults for each, but they'll appear as two options on top of eachother. Instead i'd like if a variable like cfg: <feature1> <feature2> etc could be shown as a quasi-table, where tab cycles the options in a single line, and down selects another feature. I may have missed a example like this.
Describe the solution you'd like A mode for display of lines line this with multiple variables that allows this mode.
Describe alternatives you've considered The usual, selecting them all once at a time. This multiplies the times you press enter by the number of features you allow to be shown, instead of a single enter if you don't want to change anything from the default.
Additional context None
where tab cycles the options in a single line, and down selects another feature
I'm not sure that's gonna be possible unless I implement my own fuzzy finder (instead of using fzf).
A workaround would be:
# my make command
make <cfg>
$ cfg: for x in 1 2 3; do for y in a b c; do echo "$x $y"; done; done --- --expand
By default we would have 1 a
(~which could be selected using <tab>
~ nvm). All other combinations would be listed too.
I'm sorry, could be selected using what? I thought i had to place '\n' in between options, do you mean to say you can select single options side by side?
That said, it's not quite the same as being able to show all the defaults and skip ahead.
Ah well, it doesn't matter that much anyway, the current approach looks fine. It's just annoying to have to press enter 10+ times until you get to the interesting options or the ending if you don't want to change anything.
Speaking of that, it comes to mind that a special widget is not strictly necessary for the common case where you change nothing in most variables if there was a 'eager' mode for variables that selected their (all of the eager variables and eager variables that reference only other eager variables) default and allowed you to skip ahead for them - though what form of user interaction would allow that skip and how to make it obvious to users, i don't quite know what's best. Maybe something silly like marking as bold/italic and filled the <vars> with defaults and alt+enter will fill them all and take you to the first non-eager one, continuing with only the non-eager variables.