zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.69k stars 2.65k forks source link

Change vim leader mapping #4375

Open rauann opened 10 months ago

rauann commented 10 months ago

Check for existing issues

Describe the feature

Is there a way to change the predefined vim leader g to another key, like space?

If applicable, add mockups / screenshots to help present your vision of the feature

No response

ConradIrwin commented 10 months ago

@rauann Currently the only configuration for keyboard mappings is to map from what is typed to an "action". So although it's a bit tedious, you could implement something like a leader key by copying the bindings over.

For example if you wanted to use , you could do something like:

[
  {
    "context": "Editor && VimControl && !VimWaiting && !menu",
    "bindings": {
      ", .": "editor::ToggleCodeActions",
      ", shift-a": "editor::FindAllReferences",
      // etc.
    }
  }
]