Open sucrecacao opened 2 years ago
I have plans to improve the way key bindings are defined. However, key bindings in VS Code cannot simply be added by an extension (dynamically); the user has to modify keybindings.json
themselves.
Your best bet is to make (or find) an extension that modifies the key bindings according to some logic (I think this is too niche / complex to be a Dance feature). You could take a look at https://github.com/71/autoscripts for a way to have dynamic configuration and key bindings.
As I understand keybindings.json
represent all vscode keybinding.
Couldn't find on internet if there is a way to import multiple keybinding file in vscode.
If so, then keybindings.json
can stay the same and another file dance_keybindings.json
could be externally updated with:
create_dance_kb_from_xressource.sh > path/to/dance_keybindings.json
Problem
Solution
Get the mapping from Xressource, so it need to be defined once in Xressource files and will apply to both kakoune and dance.
Design
seting up Xressource
Install Xressources then write in
~/.xres
finally in a terminal
xrdb ~/.xres
In dance
I'll just sketch it rapidly as pseudo code:
Instead of using
Use:
getXRessource
should be easy to implement:( I don't know what is the equivalent of popen in vscode API)
Other use case