Evaluating Zed
Template: Evaluating a text editor
Zed is a "next-generation" code editor. I tested it out after becoming increasingly unsatisfied with VS Code.
Critical
- Line numbers
- Syntax highlighting
- Tabs
- Integrated compiler errors
- Symbol-based autocomplete
- Customizable keyboard shortcuts
- Very similar interface to VS Code. Not very intuitive to use. Overriding default keybindings is tricky. (#20167)
- Jump to definition (
F12
) - Search for file in project (
Cmd+P
) - Search in file (
Cmd+F
) - Replace in file
- Search file contents in project (
Ctrl+Shift+F
)- I like the interface better than VS Code's. It displays a few lines of context around each match and even lets you edit directly from the search results panel.
Important
- Hover-over documentation
- Smart rename
- Integrated terminal
- File explorer view
- Line-wrapping for text and Markdown documents
- Version control: Revert uncommitted changes
- I like the UX better than VS Code's.
- Version control: View file blame
- Auto-format on save
- Settings well-documented
- Documentation here: https://zed.dev/docs/configuring-zed
- Vim mode
- Custom Vim mode keybindings
- Documentation here: https://zed.dev/docs/vim#customizing-key-bindings
Nice-to-have
- AI autocomplete
- Not evaluated (requires sign-in)
- Markdown preview
- Version control: Interactive merge conflict resolution
- Not evaluated
- https://github.com/zed-industries/zed/discussions/26510
- Source-code minimap
- Setting:
"minimap": { "show": "always" }
- Setting:
- If settings are JSON, auto-complete for settings names and values in the editor
Customizations
Keymap
Make Ctrl+Tab
, Ctrl+Shift+Tab
, Ctrl+PgDn
, and Ctrl+PgUp
behave like Chrome:
{
"context": "Pane",
"bindings": {
"ctrl-tab": "pane::ActivateNextItem",
"ctrl-shift-tab": "pane::ActivatePreviousItem",
"ctrl-pagedown": "pane::ActivateNextItem",
"ctrl-pageup": "pane::ActivatePreviousItem"
}
},
{
"context": "Editor",
"bindings": {
"ctrl-pagedown": "pane::ActivateNextItem",
"ctrl-pageup": "pane::ActivatePreviousItem"
}
}
Vim mode keybindings:
{
"context": "vim_mode == insert",
"bindings": {
"j j": "vim::NormalBefore"
}
}
Make Opt+Enter
work in the terminal (macOS):
{
"context": "Terminal",
"bindings": { "alt-enter": ["terminal::SendKeystroke", "alt-enter"] }
}
Settings
Apparently both pylsp
and pyright
were enabled by default for Python, which caused issues – duplicate tooltips, autocomplete didn't work. I solved it by only enabling pyright
:
"languages": {
"Python": {
"language_servers": ["pyright"]
}
}
Auto-format Python files on save using black
:
"languages": {
"Python": {
"format_on_save": "on",
"formatter": { "external": { "command": "black", "arguments": ["-"]
}
}
Enable Vim mode:
"vim_mode": true
Make Opt
key on macOS function as Meta
in the integrated terminal:
"terminal": {
"option_as_meta": true
}