Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop-gap support for command sequences/macros in keymaps #517

Closed
cessen opened this issue Jul 27, 2021 · 1 comment · Fixed by #589
Closed

Stop-gap support for command sequences/macros in keymaps #517

cessen opened this issue Jul 27, 2021 · 1 comment · Fixed by #589
Labels
A-keymap Area: Keymap and keybindings C-enhancement Category: Improvements

Comments

@cessen
Copy link
Contributor

cessen commented Jul 27, 2021

In #500 and #165 people have been discussing wanting alternative behaviors to some of Helix's current commands. In all cases, the desired behaviors can be achieved by composing existing commands. In some cases we may want to add built-in commands with those behaviors, but in many cases we probably don't. Nevertheless, I think it's reasonable for some users to want those behaviors.

To support customizing behaviors that way, I'd like to suggest adding support for binding command sequences to keys, not just individual commands. Perhaps with the count of each command optionally specified.

Along with designing the core commands to be composable, this would allow users a lot of flexibility to easily and quickly customize Helix's behavior.

Alternatives

Instead of supporting this at the keymap level, we could delegate all responsibility for this kind of thing to the plugin system. This would make the barrier to customizing Helix's behavior--even in basic ways--much higher, but would keep the keymap system a little simpler.

@cessen cessen added the C-enhancement Category: Improvements label Jul 27, 2021
@cessen
Copy link
Contributor Author

cessen commented Jul 30, 2021

After discussing on the matrix channel, we've all agreed that this shouldn't be the long-term solution. Eventually we want to support some kind of scripting language for configuration rather than TOML, and that would provide enough flexibility to do this (among other things) without needing to reach for compiled plugins.

However, we may still want to do this as a short-term solution, which will later get removed when we move to the new configuration system.

@cessen cessen changed the title Support command sequences/macros in keymaps Stop-gap support for command sequences/macros in keymaps Jul 30, 2021
@archseer archseer linked a pull request Aug 16, 2021 that will close this issue
@kirawi kirawi added the A-keymap Area: Keymap and keybindings label Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-keymap Area: Keymap and keybindings C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants