Open haasn opened 2 months ago
Possibly connected with
I think #16294 would certainly help you, but the best workaround I can suggest for the moment is to maintain two distinct keybinds (laptop.json and ergonomic.json) and then have command line aliases that toggles a ~/.config/zed/keymap.json symlink. Untested, but something like:
alias zedlap="ln -sf ~/.config/zed/laptop.json ~/.config/zed/keymap.json"
alias zederg="ln -sf ~/.config/zed/ergonomic.json ~/.config/zed/keymap.json"
Check for existing issues
Describe the feature
I am using a git repository to synchronize my settings (and keymap) across machines. However, my two devices have radically different input methods (ergonomic keyboard vs standard laptop slab), and as such, want some slightly different keybindings. Complicating things is the fact that I sometimes attach the input device from my desktop to my laptop instead.
It would be fantastic if there was some way to solve this, and let me use both input devices interchangeably, with my keybindings adjusting to compensate.
If applicable, add mockups / screenshots to help present your vision of the feature
Some ideas I can come up with:
A) Multiple settings files
If I could split my settings into e.g.
settings.json
andsettings.local.json
(ditto keymap), then I could add the settings.local.json to my keymap for the laptop. This wouldn't fully solve the problem, but it would be an interesting idea nonetheless.B) Ability to include settings files
If I could somehow
#include
other files from settings/keymap.json, I could switch between the two profiles by just commenting out one line. This would also be a strict superset of the previous proposal.C) Multiple settings profiles / layers
Like the former approach, but with inbuilt support for enumerating / switching between settings profiles. Most flexible approach, I think. Or we could treat profiles like toggleable "layers", which can overwrite settings from the previous "layer". (The "default" keybindings forming the base layer)
D) More keymap conditions (e.g. conditional on hostname)
This would let me make keybindings that only apply on my laptop. Though, it's not an ideal solution, as I really want to conditionalize by the input device in use, not the hostname. It also wouldn't allow for conditional global settings.