I was trying out zed after VS Code and I've stumbled upon inconsistency with debugging hotkeys. In VS Code it's f10/f11, in zed it was much more awkward f7/ctrl-f11. Investigating, I've found that I can't just override f11, because it's used by `zed::ToggleFullScreen` global hotkey and global hotkey always beats `Workspace && debugger_stopped`. Furthermore, I've found f11 hotkey is available, but only on Mac. And on Windows there was no `StepInto` hotkey at all. So configs were unsynced in that regard. Code changes: - To make f11 overridable, I've moved it to `Workspace` context - it's still pretty global, but now it's overridable. Though `Workspace && debugger_stopped` have the same depth as `Workspace`, it will take priority, because it's registered later in .json. - StepInto - added f11 hotkey for all platforms (was missing on linux and windows), kept older ctrl-f11 too as some users might be used to it. A note that on Mac F11 was added previously as `Workspace && debugger_running` - which practically means the hotkey wasn't available. `debugger_running` means debugger is running in background, user needs step commands when `debugger_stopped`- when they're actually stepping through the code. - StepOver - added f10 hotkey for all platforms (was missing on linux and mac). Kept old f7 hotkey on linux and mac, didn't added it on windows as it wasn't present before. - StepOut - it was consistently shift-f11 on all platforms already, just moved it from global context for consistency. - Removed StepOver, StepInto, StepOut from debugger_session context and kept it only in `debugger_stopped`, as this is when they're actually useful, similar to how we have `debugger::Continue"` there which also makes sense only when debugger is stopped. I've separated changes by commits, so it would be easier to review them. PS Global hotkeys overriding specific ones seems a bit odd by itself - it seems global more specific hotkeys should always have a priority, so maybe it's something to look into too. Another thing that `default-xxx.json` share a lot of hotkeys, so maintaining them separately may have other things going out of sync too. Closes #58899. ---- Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - keymaps are not tested - [x] Performance impact has been considered and is acceptable Release Notes: - Improved debugger step keybindings across platforms to match VS Code defaults while preserving fullscreen outside paused sessions --------- Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
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 (macOS/Linux/Windows).
Other platforms are not yet available:
- Web (tracking discussion)
Developing Zed
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
Zed source code is licensed primarily under GPL-3.0-or-later, with Apache-2.0 components where marked.
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.
Sponsorship
Zed is developed by Zed Industries, Inc., a for-profit company.
If you’d like to financially support the project, you can do so via GitHub Sponsors. Sponsorships go directly to Zed Industries and are used as general company revenue. There are no perks or entitlements associated with sponsorship.