I quite like how Zed handles keybindings
For example, here are my mappings
[
{
"context": "Editor && vim_mode == insert && !menu",
"bindings": {
"j j": "vim::NormalBefore"
}
},
{
"context": "Editor && vim_mode == normal && !menu",
"bindings": {
"space w": "workspace::Save",
"space s t": "workspace::NewSearch",
"space f": "file_finder::Toggle"
}
}
]
I do think this should happen after the settings refactor.
There’s some initial work towards refactoring here:
And I also think something like KDL would be better suited, so perhaps just a revamped config file would make sense
We’d need
- Sort out settings, they’re messy
- Abstract away inputs. The UI should handle actions, not actual key combos. Then all of our mappings can just be key → action, rather than key → implementation
- Figure out a nice format that can express keybindings in a flexible enough way