Creating Language specific keybindings #34892
-
Hello, Is there a way to create language specific keybindings in the keymap.json? For example in neovim I have something like this:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can apply different keybinds for different contexts, which supports filtering on file extension. For example, here's an example from the default macOS keymap that applies SVG specific keybinds: zed/assets/keymaps/default-macos.json Lines 588 to 594 in a48247a To help debug your keybinds and see what context each key stroke matches, run the |
Beta Was this translation helpful? Give feedback.
You can apply different keybinds for different contexts, which supports filtering on file extension. For example, here's an example from the default macOS keymap that applies SVG specific keybinds:
zed/assets/keymaps/default-macos.json
Lines 588 to 594 in a48247a
To help debug your keybinds and see what context each key stroke matches, run the
dev: Open Key Context View
action.Docs: https://zed.dev/docs/key-bindings#contexts