Open iogf opened 7 years ago
I do prefer the first one, but I don't get why going for this. Is it a shortcut to bind multiple keys to the same function? Like << VirtualEvent >> -> my_pretty_function Key-a -> << VirtualEvent >> Key-b -> << VirtualEvent >>
?
The main goal would be turning it easier for users to remap functionalities. Instead of having to remap a key to a key, one could just remap a custom event to a keypress. The custom event would be documented by the plugin. Basicly, you would do something like:
remap('<SomeFunctionality>', '<Key-x>')
Instead of
remap('<Key-y>', '<Key-x>')
Where Key-y is linked to some function. It is much more meaningful to have
'<Somefunctionality>'
rather than
'<Key-y>'
when having to remap keys.
Definetly true. Although it could also be done the other way around by having a way to pass plugins params from vyrc where you could specify the keys you desires (as well other configurations some plugins might need, like where to find a language server if a plugin needs one) and, only if not found, fallback to default.
I still think remap is a cool feature to keep, but I do think it should not be the default for plugins key.
It may be better to implement custom keymaps for plugins to use virtual events like:
or it could be.