mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
I love keybindings. I spend way to much time thinking about them. I also REALLY like working in Zed. so far, however, I have found the key context system in Zed to be less flexible than in VSCode. the HUGE context that is available in VSCode helps you create keybindings for very specific targeted scenarios. the tree like structure of the Zed key context means you loose some information as focus moves throughout the application. For example, it is not currently possible to create a keybinding in the editor that will only work when one of the Docks is open, or if a specific dock is open. this would be useful in implementing solutions to ideas like #24222 we already have an action for moving focus to the dock, and we have an action for opening/closing the dock, but to my knowledge (very limited lol) we cannot determine if that dock *is open* unless we are focused on it. I think it is possible to create a more flexible key binding system by adding more context information to the higher up context ancestors. while: ``` Workspace right_dock=GitPanel Dock GitPanel Editor ``` may seem redundant, it actually communicates fundamentally different information than: ``` Workspace right_dock=GitPanel Pane Editor ``` the first says "the GitPanel is in the right hand dock AND IT IS FOCUSED", while the second means "Focus is on the Editor, and the GitPanel just happens to be open in the right hand dock" This change adds a new set of identifiers to the `Workspace` key_context that will indicate which docks are open and what is the specific panel that is currently visible in that dock. examples: - `left_dock=ProjectPanel` - `bottom_dock=TerminalPanel` - `right_dock=GitPanel` in my testing the following types of keybindings seem to be supported with this change: ```jsonc // match for any value of the identifier "context": "Workspace && bottom_dock" "context": "Workspace && !bottom_dock" // match only a specific value to an identifier "context": "Workspace && bottom_dock=TerminalPanel" // match only in a child context if the ancestor workspace has the correct identifier "context": "Workspace && !bottom_dock=DebugPanel > Editor" ``` some screen shots of the context matching in different circumstances: <img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 20 34" src="https://github.com/user-attachments/assets/116d0575-a1ae-4577-95b9-8415cda57e52" /> <img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 20 57" src="https://github.com/user-attachments/assets/000fdbb6-80bd-46e9-b668-f4b54ab708d2" /> <img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 21 37" src="https://github.com/user-attachments/assets/7b1c82da-b82f-4e14-a97c-3cd0e71bbca0" /> <img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 21 52" src="https://github.com/user-attachments/assets/1fd4b65a-09f7-47a9-a9b7-fdce4252aec3" /> <img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 22 38" src="https://github.com/user-attachments/assets/f4c2ac5c-e6f9-4e0e-b683-522b237e3328" /> the persistent_name values for `ProjectPanel` and `OutlinePanel` needed to be updated to not have a space in them in order to pass the `Identifier` check. all the other Panels already had names that did not include spaces, so it just makes these conform with the other ones. I think this is a great place to start with adding more context identifiers and i think this type of additional information will make it possible to create really dynamic keybindings! Release Notes: - Workspace key context now includes the state of the 3 docks |
||
|---|---|---|
| .cargo | ||
| .cloudflare | ||
| .config | ||
| .github | ||
| .zed | ||
| assets | ||
| crates | ||
| docs | ||
| extensions | ||
| legal | ||
| nix | ||
| script | ||
| tooling | ||
| .clinerules | ||
| .cursorrules | ||
| .git-blame-ignore-revs | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| .prettierrc | ||
| .rules | ||
| .windsurfrules | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CLAUDE.md | ||
| clippy.toml | ||
| CODE_OF_CONDUCT.md | ||
| compose.yml | ||
| CONTRIBUTING.md | ||
| debug.plist | ||
| default.nix | ||
| docker-compose.sql | ||
| Dockerfile-collab | ||
| Dockerfile-collab.dockerignore | ||
| Dockerfile-cross.dockerignore | ||
| Dockerfile-distros | ||
| Dockerfile-distros.dockerignore | ||
| flake.lock | ||
| flake.nix | ||
| GEMINI.md | ||
| LICENSE-AGPL | ||
| LICENSE-APACHE | ||
| LICENSE-GPL | ||
| livekit.yaml | ||
| lychee.toml | ||
| Procfile | ||
| Procfile.postgrest | ||
| Procfile.web | ||
| README.md | ||
| renovate.json | ||
| rust-toolchain.toml | ||
| shell.nix | ||
| typos.toml | ||
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.