Tridactyl: Change default binding of "gi"

Created on 3 Dec 2020  路  4Comments  路  Source: tridactyl/tridactyl

Tridactyl version: 1.20.2
Firefox version: Mozilla Firefox 82.0.2
Operating system: mac

Should we change the default gi binding to focusinput? The default binding is focusinput -l and the argument is fixed to last input. The use case is to allow using numbered count argument with the binding. i.e. 3gi expands to focusinput 3.

https://github.com/tridactyl/tridactyl/blob/f694f6a669d92969ae54724c790fd495dac2eec0/src/lib/config.ts#L240

P4 bug

All 4 comments

Thanks for filing this issue.

  1. You can do this yourself with bind gi focusinput
  2. I'm reluctant to change defaults as it can surprise users who are used to it working the way it currently does. But if enough people tell me that this is a good idea in this issue I'm happy to change it : )

Thanks for the response, I whole-heartedly agree with your hesistance regarding "breaking my workflow" surprises. Coming from vimperator, gi didn't quite completely work initially (IIRC "count" prefixing was not yet supported back then) and I've been working around/avoiding and using hinting instead. At this point in time though, the current default might be entrenched though 馃槄

The documentation for focusinput implies the default behaviour should implicitly be focusinput -l. But that doesn't seem to be the case, from empirical testing. If this is a bug, fixing it would allow for updating the binding, not changing the current behaviour of gi, and supporting my use case! My personal opinion is that the default binds should be for convenience and not opinionated, we bake that into the default behaviour of the underlying command (certainly open to second opinions on this).

https://github.com/tridactyl/tridactyl/blob/bff998aeb759d4a92f2b77c61be43fc38b6b3aa4/src/excmds.ts#L1950

Yeah, you're right. Let's make focusinput with no args do -l, and change the default bind to just focusinput.

Happy to accept a PR that does that (bonus points if the function gets tidied up at the same time - it looks like there's a bit of duplicated code). Otherwise this will go on my to-do list which I attack somewhat at random : )

Cool, this seems like a great ticket for me to help contribute on (not-urgent, low priority, well-scoped).

Was this page helpful?
0 / 5 - 0 ratings