A high-performance, multiplayer code editor from the creators of Atom and Tree-sitter. Complete developer reference.
The essential Zed keybindings and commands at a glance. On macOS, Cmd replaces Ctrl and Option replaces Alt throughout.
Zed is available on macOS and Linux. The editor is open-source under a copyleft license (GPL for the editor, Apache/MIT for GPUI framework).
# Official installer (recommended)
curl -f https://zed.dev/install.sh | sh
# Homebrew
brew install --cask zed
# Install the preview channel
brew install --cask zed@preview
# Official installer
curl -f https://zed.dev/install.sh | sh
# Arch Linux (AUR)
paru -S zed-editor
# Flatpak
flatpak install flathub dev.zed.Zed
# Nix
nix-env -iA nixpkgs.zed-editor
# Open a file or directory
zed .
zed src/main.rs
# Open at a specific line
zed src/main.rs:42
# Wait for files to be closed (useful for git)
zed --wait src/main.rs
# Set as default $EDITOR
export EDITOR="zed --wait"
# Set as git editor
git config --global core.editor "zed --wait"
| Component | macOS | Linux |
|---|---|---|
| OS | macOS 10.15.7+ (Catalina) | glibc 2.29+, systemd |
| GPU | Metal-capable (any recent Mac) | Vulkan 1.3 capable |
| RAM | 4 GB minimum, 8 GB recommended | |
| Disk | ~200 MB | |
Zed's architecture is fundamentally different from Electron-based editors. Understanding these foundations explains why it's fast and how it's designed.
Zed uses familiar VS Code-style defaults with full customization via a keymap.json file. Vim mode is built-in and toggled via settings.
Open your keymap from the command palette: Cmd K Cmd S or zed: open keymap.
[
{
"context": "Editor",
"bindings": {
"ctrl-shift-k": "editor::DeleteLine",
"alt-shift-f": "editor::Format",
"ctrl-shift-d": "editor::DuplicateLine"
}
},
{
"context": "Workspace",
"bindings": {
"ctrl-shift-t": "workspace::NewTerminal",
"ctrl-`": "terminal_panel::ToggleFocus"
}
}
]
Enable Vim emulation to use modal editing with full support for motions, operators, text objects, and visual mode.
// In settings.json
{
"vim_mode": true,
"vim": {
"use_system_clipboard": "always",
"use_smartcase_find": true
}
}
: commands like :w, :q, :wq, :e filename, :s/old/new/g, and :%s. Custom keybindings use a "vim::Normal" context.Keybindings are scoped to contexts, so the same key can do different things in different panels:
| Context | Scope |
|---|---|
Editor | Any text editing buffer |
Workspace | Top-level workspace actions |
Pane | Tab/split management |
Terminal | Integrated terminal |
ProjectPanel | File tree sidebar |
vim::Normal | Vim normal mode |
vim::Visual | Vim visual mode |
vim::Insert | Vim insert mode |
Access every Zed action through the fuzzy-search command palette via Cmd Shift P. Commands use a namespace::Action naming convention.
| Command | Description |
|---|---|
zed: open settings | Open settings.json in a split view with defaults |
zed: open keymap | Open keymap.json for custom keybindings |
theme selector: toggle | Browse and preview installed themes |
editor: toggle vim mode | Switch between Vim and standard editing |
workspace: new terminal | Open a new integrated terminal tab |
editor: format document | Run the configured formatter |
editor: toggle inlay hints | Show/hide type and parameter hints |
diagnostics: toggle | Open the diagnostics panel |
project symbols: toggle | Fuzzy search across workspace symbols |
collab: share project | Start a collaboration session |
assistant: toggle focus | Open or focus the AI assistant panel |
zed: extensions | Browse and install extensions |
| Shortcut | Palette | What It Searches |
|---|---|---|
| Cmd P | File Finder | Files in project (fuzzy match) |
| Cmd Shift P | Command Palette | All editor commands/actions |
| Cmd T | Symbol Navigator | Functions, classes, types |
| Cmd G | Go to Line | Jump to line:column |
| Ctrl Tab | Buffer Switcher | Open tabs (most recent first) |
Zed has powerful multi-cursor support and structural editing features powered by Tree-sitter. These work in both standard and Vim modes.
Cmd + F Find in buffer
Cmd + H Find and replace
Cmd + Shift + F Project-wide search
Enter Next match
Shift + Enter Previous match
Alt + Enter Select all matches (creates multi-cursor)
Supports: regex, case-sensitive, whole word, multi-line
Zed uses JSON configuration files. Global settings live at ~/.config/zed/settings.json. Project-local settings go in .zed/settings.json at the project root.
{
// UI
"theme": "One Dark",
"ui_font_size": 15,
"buffer_font_family": "JetBrains Mono",
"buffer_font_size": 14,
"buffer_line_height": "comfortable",
// Editor behavior
"tab_size": 4,
"hard_tabs": false,
"format_on_save": "on",
"remove_trailing_whitespace_on_save": true,
"ensure_final_newline_on_save": true,
"soft_wrap": "editor_width",
"show_whitespaces": "selection",
"relative_line_numbers": true,
// Vim mode
"vim_mode": true,
// File settings
"file_scan_exclusions": [
"**/.git",
"**/node_modules",
"**/target",
"**/.next"
],
// Minimap
"minimap": {
"show": "auto"
},
// Inlay hints
"inlay_hints": {
"enabled": true,
"show_type_hints": true,
"show_parameter_hints": true
}
}
{
"languages": {
"Python": {
"tab_size": 4,
"formatter": {
"external": {
"command": "black",
"arguments": ["-"]
}
}
},
"JavaScript": {
"tab_size": 2,
"formatter": "prettier"
},
"Rust": {
"tab_size": 4,
"format_on_save": "on"
}
}
}
// Project-local settings override global settings
{
"tab_size": 2,
"hard_tabs": false,
"lsp": {
"rust-analyzer": {
"initialization_options": {
"checkOnSave": {
"command": "clippy"
}
}
}
}
}
.zed/settings.json) override global settings (~/.config/zed/settings.json) which override Zed defaults. Open settings via command palette to see defaults alongside your overrides.| File | Path | Purpose |
|---|---|---|
| Global settings | ~/.config/zed/settings.json |
User-wide preferences |
| Keybindings | ~/.config/zed/keymap.json |
Custom key mappings |
| Tasks | ~/.config/zed/tasks.json |
Global task definitions |
| Project settings | .zed/settings.json |
Per-project overrides |
| Project tasks | .zed/tasks.json |
Per-project task runners |
Zed provides first-class LSP support with automatic server management. Language servers are downloaded and started automatically when you open a file of a supported language.
| Feature | Keybinding | Description |
|---|---|---|
| Go to Definition | F12 | Jump to where a symbol is defined |
| Go to Type Definition | Cmd F12 | Jump to the type of a symbol |
| Find References | Shift F12 | List all usages of a symbol |
| Rename Symbol | F2 | Rename across all files |
| Code Actions | Cmd . | Quick fixes, refactors, imports |
| Hover Documentation | Mouse hover / Cmd K Cmd I | Show type info and docs |
| Signature Help | Auto (while typing) | Parameter hints for function calls |
| Inlay Hints | Toggle via settings | Inline type/parameter annotations |
| Diagnostics | Cmd Shift M | Errors, warnings, info messages |
| Document Symbols | Cmd Shift O | Navigate file structure |
{
"lsp": {
"rust-analyzer": {
"initialization_options": {
"checkOnSave": { "command": "clippy" },
"cargo": { "allFeatures": true },
"procMacro": { "enable": true }
}
},
"pyright": {
"settings": {
"python": {
"pythonPath": ".venv/bin/python"
}
}
},
"typescript-language-server": {
"initialization_options": {
"preferences": {
"importModuleSpecifierPreference": "relative"
}
}
}
}
}
Zed supports language server formatters, external commands, and Prettier as built-in formatter options:
{
// Use the language server's formatter
"formatter": "language_server",
// Use Prettier (auto-detected)
"formatter": "prettier",
// Use an external command
"formatter": {
"external": {
"command": "dprint",
"arguments": ["fmt", "--stdin", "{buffer_path}"]
}
}
}
Zed's extension system adds languages, themes, and slash commands. Extensions are written in Rust and compiled to WebAssembly for sandboxed execution.
# Open the extensions panel:
Command Palette → "zed: extensions"
# Or use the keyboard shortcut:
Cmd + Shift + X
# Browse, install, and manage from the Extensions panel
# Extensions install instantly (pre-compiled WASM)
| Extension | Type | Description |
|---|---|---|
| HTML | Language | HTML/CSS support with Emmet completions |
| Docker | Language | Dockerfile and Compose syntax |
| Svelte / Vue | Language | Framework-specific language support |
| Catppuccin | Theme | Popular pastel color scheme |
| Gruvbox | Theme | Retro warm-toned scheme |
| Tokyo Night | Theme | Clean dark theme with purple accents |
my-extension/
extension.toml # Metadata (name, version, type)
src/
lib.rs # Rust source (compiled to WASM)
languages/
my-lang/
config.toml # Language config (LSP, formatter)
highlights.scm # Tree-sitter highlighting queries
injections.scm # Language injections (e.g., JS in HTML)
themes/
my-theme.json # Theme definition
Zed was built for real-time multiplayer editing. Share your project and code together with zero setup, powered by CRDTs and Zed's servers.
collab: share project from the command palettecollab: share project
Start sharing
collab: unshare project
Stop sharing
collab: copy link
Copy invite link
collab: follow
Follow a collaborator
collab: unfollow
Stop following
Zed has a built-in AI assistant panel that supports multiple LLM providers. Use it for code generation, explanation, refactoring, and conversation-style interactions with your codebase.
{
"assistant": {
"default_model": {
"provider": "anthropic",
"model": "claude-sonnet-4-20250514"
},
"version": "2"
},
// Or use OpenAI
"assistant": {
"default_model": {
"provider": "openai",
"model": "gpt-4o"
}
},
// Or use Ollama for local models
"assistant": {
"default_model": {
"provider": "ollama",
"model": "llama3.1:70b"
}
}
}
Use slash commands in the assistant panel to provide context:
| Command | Description |
|---|---|
/file path/to/file | Include file contents as context |
/tab | Include all open tabs as context |
/diagnostics | Include current diagnostics/errors |
/selection | Include currently selected code |
/terminal | Include recent terminal output |
/search query | Include project search results |
/docs crate-name | Include docs for a dependency (via extension) |
Zed includes a GPU-rendered terminal emulator. It uses the same rendering pipeline as the editor for consistent performance and font rendering.
{
"terminal": {
"shell": "system",
"font_family": "JetBrains Mono",
"font_size": 13,
"line_height": "comfortable",
"working_directory": "current_project_directory",
"blinking": "terminal_controlled",
"env": {
"TERM": "xterm-256color"
}
}
}
Define reusable tasks that run in the terminal. Tasks support variables and can be bound to keybindings.
[
{
"label": "cargo test",
"command": "cargo test",
"args": [],
"env": { "RUST_BACKTRACE": "1" },
"use_new_terminal": true,
"reveal": "always"
},
{
"label": "run current file",
"command": "$SHELL",
"args": ["-c", "$ZED_FILE"],
"use_new_terminal": false
}
]
$ZED_FILE (current file path), $ZED_ROW / $ZED_COLUMN (cursor position), $ZED_WORKTREE_ROOT (project root), $ZED_SYMBOL (symbol at cursor).Zed's project search is powered by a fast file indexer. Results stream in as you type, with syntax-highlighted previews and instant navigation.
/ to scope to directories.| Toggle | Icon | Behavior |
|---|---|---|
| Case Sensitive | Aa | Match exact case |
| Whole Word | W | Match complete words only |
| Regex | .* | Enable regular expressions |
| Include/Exclude | ... | Glob patterns to filter files |
# 1. Open project search
Cmd + Shift + F
# 2. Enter search term, toggle regex if needed
# 3. Click the replace toggle (arrow icon)
# 4. Enter replacement text
# 5. Replace options:
Replace One → Replace current match
Replace All → Replace every match across project
# Regex capture groups work ($1, $2, etc.)
Zed ships with several built-in themes and supports custom themes via extensions. Switch themes instantly from the theme selector.
# Open the theme selector:
Cmd + K, Cmd + T
# Or: Command Palette → "theme selector: toggle"
# Preview themes by navigating with arrow keys
# Press Enter to apply, Escape to cancel
# Set in settings.json:
{
"theme": {
"mode": "dark",
"dark": "One Dark",
"light": "One Light"
}
}
{
// Editor font (code)
"buffer_font_family": "JetBrains Mono",
"buffer_font_size": 14,
"buffer_font_weight": 400,
"buffer_font_features": {
"calt": true, // Ligatures
"ss01": true // Stylistic set 1
},
"buffer_line_height": "comfortable",
// UI font (menus, panels)
"ui_font_family": "Inter",
"ui_font_size": 15
}
Power-user techniques to get the most out of Zed's speed and features.
div.container>ul>li*5 and press Tab to expand into full markup.
: to jump to a line number (e.g., main.rs:42) or @ to jump to a symbol within the file.
| VS Code Feature | Zed Equivalent | Notes |
|---|---|---|
| settings.json | settings.json | Similar format, different keys |
| keybindings.json | keymap.json | Context-scoped bindings |
| Extensions | Extensions (WASM) | Smaller ecosystem, growing fast |
| Copilot | AI Assistant | Multi-provider, inline + panel |
| Live Share | Built-in Collab | Native CRDT, no extension needed |
| tasks.json | tasks.json | Compatible concept, different schema |
| launch.json | Not yet (tasks only) | Debugging support is in development |
| Integrated Git | Git Panel | Inline blame, gutter indicators |
LSP not starting?
# Check the Zed log:
Command Palette → "zed: open log"
# Restart the language server:
Command Palette → "lsp: restart server"
Slow on large repos?
# Add heavy directories to file_scan_exclusions
# in settings.json (node_modules, target, etc.)
Keymap conflicts?
# Check key bindings:
Command Palette → "zed: open keymap"
# Later entries override earlier ones
GPU rendering issues on Linux?
# Verify Vulkan support:
vulkaninfo | head -20
# Try with software rendering:
LIBGL_ALWAYS_SOFTWARE=1 zed