Tech Guides
Built with Rust · GPU-Accelerated

Zed Editor

A high-performance, multiplayer code editor from the creators of Atom and Tree-sitter. Complete developer reference.

Rust
Built In
GPU
Rendered
CRDT
Collaboration
LSP
Native
01

Quick Reference

The essential Zed keybindings and commands at a glance. On macOS, Cmd replaces Ctrl and Option replaces Alt throughout.

File Navigation

Cmd P Quick file open
Cmd Shift P Command palette
Cmd B Toggle sidebar
Cmd Shift E Project panel
Ctrl Tab Switch open buffers
Cmd G Go to line

Editing

Cmd D Select next occurrence
Cmd Shift L Select all occurrences
Alt Shift Up/Down Add cursor above/below
Cmd Shift K Delete line
Alt Up/Down Move line up/down
Cmd / Toggle comment

Code Intelligence

F12 Go to definition
Cmd . Code actions
Shift F12 Find all references
F2 Rename symbol
Cmd K Cmd I Show hover info
Cmd Shift O Go to symbol

Panels & Views

Cmd ` Toggle terminal
Cmd Shift F Project search
Cmd \\ Split pane
Cmd J Toggle bottom dock
Cmd Shift M Problems panel
Cmd K Z Zen mode
02

Installation

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).

macOS

Install Shell
# 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

Linux

Install Shell
# 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
Linux requires Vulkan-capable GPU drivers. Zed uses the Blade graphics abstraction (Vulkan on Linux, Metal on macOS) for GPU-accelerated rendering.

CLI Integration

CLI Shell
# 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"

System Requirements

Minimum Requirements
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
03

Core Concepts

Zed's architecture is fundamentally different from Electron-based editors. Understanding these foundations explains why it's fast and how it's designed.

GPU-Accelerated Rendering
Every frame is rendered on the GPU via Metal (macOS) or Vulkan (Linux). Text shaping, syntax highlighting, and UI elements are all composited in a single GPU pass, eliminating layout thrashing.
Performance
GPUI Framework
Zed's custom UI framework written in Rust. Immediate-mode rendering with a retained state tree. No DOM, no CSS engine — just GPU shaders and Rust layout logic. Open-source as a standalone library.
Architecture
Tree-sitter Integration
Uses incremental parsing via Tree-sitter for syntax highlighting, code folding, auto-indentation, and structural selection. Parses only the changed portions of a file on each keystroke.
Parsing
Native LSP Client
First-class Language Server Protocol support built directly into the editor. Manages language server lifecycles, handles multi-root workspaces, and supports all LSP features including inlay hints and semantic tokens.
Intelligence
CRDT-Based Collaboration
Real-time multiplayer editing using Conflict-free Replicated Data Types. Each participant sees edits instantly with automatic conflict resolution — no merge conflicts, no locking.
Collaboration
Rope Data Structure
Text buffers use a rope (balanced B-tree of text chunks) for O(log n) edits regardless of file size. Combined with Tree-sitter's incremental parsing, this enables sub-millisecond keystroke-to-render latency.
Performance
Why Zed is fast: Typical keystroke-to-pixel latency is under 1ms. Rendering an entire frame takes ~4ms on a modern GPU. By comparison, Electron-based editors measure input latency in the 30-80ms range.
04

Keybindings

Zed uses familiar VS Code-style defaults with full customization via a keymap.json file. Vim mode is built-in and toggled via settings.

Custom Keybindings

Open your keymap from the command palette: Cmd K Cmd S or zed: open keymap.

~/.config/zed/keymap.json JSON
[
  {
    "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"
    }
  }
]

Vim Mode

Enable Vim emulation to use modal editing with full support for motions, operators, text objects, and visual mode.

Enable Vim Mode JSON
// In settings.json
{
  "vim_mode": true,
  "vim": {
    "use_system_clipboard": "always",
    "use_smartcase_find": true
  }
}
Zed's Vim mode supports : commands like :w, :q, :wq, :e filename, :s/old/new/g, and :%s. Custom keybindings use a "vim::Normal" context.

Context-Sensitive Bindings

Keybindings are scoped to contexts, so the same key can do different things in different panels:

Context Scope
EditorAny text editing buffer
WorkspaceTop-level workspace actions
PaneTab/split management
TerminalIntegrated terminal
ProjectPanelFile tree sidebar
vim::NormalVim normal mode
vim::VisualVim visual mode
vim::InsertVim insert mode
05

Command Palette

Access every Zed action through the fuzzy-search command palette via Cmd Shift P. Commands use a namespace::Action naming convention.

Essential Commands

Command Description
zed: open settingsOpen settings.json in a split view with defaults
zed: open keymapOpen keymap.json for custom keybindings
theme selector: toggleBrowse and preview installed themes
editor: toggle vim modeSwitch between Vim and standard editing
workspace: new terminalOpen a new integrated terminal tab
editor: format documentRun the configured formatter
editor: toggle inlay hintsShow/hide type and parameter hints
diagnostics: toggleOpen the diagnostics panel
project symbols: toggleFuzzy search across workspace symbols
collab: share projectStart a collaboration session
assistant: toggle focusOpen or focus the AI assistant panel
zed: extensionsBrowse and install extensions

Quick Access Palettes

Shortcut Palette What It Searches
Cmd PFile FinderFiles in project (fuzzy match)
Cmd Shift PCommand PaletteAll editor commands/actions
Cmd TSymbol NavigatorFunctions, classes, types
Cmd GGo to LineJump to line:column
Ctrl TabBuffer SwitcherOpen tabs (most recent first)
06

Multi-Cursor & Advanced Editing

Zed has powerful multi-cursor support and structural editing features powered by Tree-sitter. These work in both standard and Vim modes.

Multi-Cursor Operations

Adding Cursors

Cmd D Add next match
Cmd Shift L Select all matches
Alt click Add cursor at click
Alt Shift Up Add cursor above
Alt Shift Down Add cursor below

Selection & Manipulation

Cmd Shift K Delete line
Alt Up/Down Move line
Cmd Shift D Duplicate line
Cmd L Select entire line
Ctrl Shift Up/Down Expand/shrink selection

Structural Editing with Tree-sitter

  • Syntax-aware selection — expand/shrink selection by AST nodes (Ctrl Shift Up/Down)
  • Smart indentation — auto-indent based on language grammar, not just the previous line
  • Code folding — fold at any block boundary detected by Tree-sitter (functions, classes, blocks)
  • Bracket matching — highlights and jumps between matching delimiters, aware of string context
  • Auto-close & surround — automatically inserts closing brackets, quotes; wraps selected text

Find & Replace In Buffer

Shortcuts Reference
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
07

Configuration

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.

Essential Settings

settings.json JSON
{
  // 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
  }
}

Language-Specific Settings

Language Overrides JSON
{
  "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

.zed/settings.json JSON
// Project-local settings override global settings
{
  "tab_size": 2,
  "hard_tabs": false,
  "lsp": {
    "rust-analyzer": {
      "initialization_options": {
        "checkOnSave": {
          "command": "clippy"
        }
      }
    }
  }
}
Settings cascade: Project settings (.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.

Configuration File Locations

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
08

Language Server Integration

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.

Built-in Language Support

Tier 1 — Deep Integration
Rust TypeScript Python Go C/C++
Tier 2 — Full LSP
Ruby Elixir PHP Java Zig Gleam Haskell

LSP Features

Feature Keybinding Description
Go to DefinitionF12Jump to where a symbol is defined
Go to Type DefinitionCmd F12Jump to the type of a symbol
Find ReferencesShift F12List all usages of a symbol
Rename SymbolF2Rename across all files
Code ActionsCmd .Quick fixes, refactors, imports
Hover DocumentationMouse hover / Cmd K Cmd IShow type info and docs
Signature HelpAuto (while typing)Parameter hints for function calls
Inlay HintsToggle via settingsInline type/parameter annotations
DiagnosticsCmd Shift MErrors, warnings, info messages
Document SymbolsCmd Shift ONavigate file structure

Custom LSP Configuration

LSP Settings JSON
{
  "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"
        }
      }
    }
  }
}

Formatters

Zed supports language server formatters, external commands, and Prettier as built-in formatter options:

Formatter Config JSON
{
  // 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}"]
    }
  }
}
09

Extensions

Zed's extension system adds languages, themes, and slash commands. Extensions are written in Rust and compiled to WebAssembly for sandboxed execution.

Installing Extensions

Extension Management Steps
# 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 Types

Language Extensions
Add Tree-sitter grammars and LSP configurations for new languages. Includes highlighting, indentation rules, and bracket matching.
Grammar + LSP
Theme Extensions
Custom color themes. Zed themes define both UI chrome and syntax colors in a single JSON format. VS Code themes can be ported.
Appearance
Slash Commands
Extend the AI assistant with custom slash commands. Extensions can provide context to the LLM from external sources, docs, or tools.
AI

Popular Extensions

Extension Type Description
HTMLLanguageHTML/CSS support with Emmet completions
DockerLanguageDockerfile and Compose syntax
Svelte / VueLanguageFramework-specific language support
CatppuccinThemePopular pastel color scheme
GruvboxThemeRetro warm-toned scheme
Tokyo NightThemeClean dark theme with purple accents

Developing Extensions

Extension Structure Filesystem
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
10

Collaboration

Zed was built for real-time multiplayer editing. Share your project and code together with zero setup, powered by CRDTs and Zed's servers.

How It Works

  • Share your project — click the "Share" button or run collab: share project from the command palette
  • Invite collaborators — share a link or invite contacts directly within Zed
  • Real-time CRDT sync — every keystroke is synchronized instantly with conflict-free resolution
  • Follow mode — follow a collaborator's cursor and viewport to see what they see
  • Shared terminals — collaborators can view (but not type in) your terminal by default
  • Voice channels — built-in audio chat for pair programming sessions

Collaboration Commands

Sharing

collab: share project Start sharing
collab: unshare project Stop sharing
collab: copy link Copy invite link

During a Session

collab: follow Follow a collaborator
collab: unfollow Stop following
Click avatar Toggle follow
Collaboration architecture: Zed's collab system uses CRDTs (Conflict-free Replicated Data Types), meaning edits never conflict. Two people can edit the same line simultaneously and both edits are preserved correctly. No "locked regions" like Google Docs.
11

AI Assistant

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.

Provider Configuration

AI Settings JSON
{
  "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"
    }
  }
}

AI Keybindings & Commands

Assistant Panel

Cmd ? Toggle assistant panel
Cmd Enter Send message
Cmd N New conversation

Inline Assist

Ctrl Enter Inline generation
Select + Ctrl Enter Transform selection
Escape Dismiss suggestion

Slash Commands

Use slash commands in the assistant panel to provide context:

Command Description
/file path/to/fileInclude file contents as context
/tabInclude all open tabs as context
/diagnosticsInclude current diagnostics/errors
/selectionInclude currently selected code
/terminalInclude recent terminal output
/search queryInclude project search results
/docs crate-nameInclude docs for a dependency (via extension)
Supported providers: Anthropic (Claude), OpenAI (GPT-4o), Google (Gemini), Ollama (local), and Zed's own hosted models. Configure API keys in settings or via the provider's panel in the assistant.
12

Integrated Terminal

Zed includes a GPU-rendered terminal emulator. It uses the same rendering pipeline as the editor for consistent performance and font rendering.

Terminal Shortcuts

Management

Cmd ` Toggle terminal panel
Cmd Shift ` New terminal
Ctrl Shift Tab Switch terminals

Inside Terminal

Cmd C Copy selection
Cmd V Paste
Cmd + / - Zoom in/out

Terminal Configuration

Terminal Settings JSON
{
  "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"
    }
  }
}

Tasks

Define reusable tasks that run in the terminal. Tasks support variables and can be bound to keybindings.

.zed/tasks.json JSON
[
  {
    "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
  }
]
Task variables: $ZED_FILE (current file path), $ZED_ROW / $ZED_COLUMN (cursor position), $ZED_WORKTREE_ROOT (project root), $ZED_SYMBOL (symbol at cursor).
14

Themes & Appearance

Zed ships with several built-in themes and supports custom themes via extensions. Switch themes instantly from the theme selector.

Theme Selector

Switching Themes Steps
# 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"
  }
}

Built-in Themes

Dark Themes
  • One Dark — Atom's classic dark scheme
  • Andromeda — Purple-accented dark
  • Ayu Dark — Warm dark with orange accents
  • Gruvbox Dark — Retro brown/orange tones
  • Rose Pine — Soft muted palette
Light Themes
  • One Light — Atom's light variant
  • Ayu Light — Warm, paper-like
  • Summercamp — Earthy outdoors palette
  • Rose Pine Dawn — Gentle rose tints

Font Configuration

Typography Settings JSON
{
  // 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
}
15

Tips & Tricks

Power-user techniques to get the most out of Zed's speed and features.

Pane Management
Split the editor into multiple panes for side-by-side editing:

Cmd \ — Split right
Cmd K Up/Down/Left/Right — Focus pane in direction
Cmd K Cmd Up/Down/Left/Right — Move tab to pane
Multi-Buffer Editing
After a project-wide search or "Find All References," Zed opens results in a multi-buffer view. You can edit directly in this view and changes propagate to the source files.
Emmet Support
Zed supports Emmet abbreviation expansion in HTML, JSX, and CSS files. Type div.container>ul>li*5 and press Tab to expand into full markup.
Outline View
Cmd Shift O opens a structured outline of the current file (functions, classes, headings). Navigate and filter instantly via fuzzy matching.
Git Integration
Zed shows git diff indicators in the gutter (added, modified, deleted lines). Inline blame annotations show authorship. The Git panel provides commit, stage, and diff operations.
Zen Mode
Cmd K Z enters Zen mode, hiding all UI chrome for distraction-free coding. The editor, centered and clean, with nothing but your code.
Quick Open Tricks
In the file finder (Cmd P), use : to jump to a line number (e.g., main.rs:42) or @ to jump to a symbol within the file.
Recent Projects
Cmd Alt O opens a list of recent projects for quick workspace switching. Zed remembers your open tabs and pane layout per project.

Migrating from VS Code

VS Code → Zed Equivalents
VS Code Feature Zed Equivalent Notes
settings.jsonsettings.jsonSimilar format, different keys
keybindings.jsonkeymap.jsonContext-scoped bindings
ExtensionsExtensions (WASM)Smaller ecosystem, growing fast
CopilotAI AssistantMulti-provider, inline + panel
Live ShareBuilt-in CollabNative CRDT, no extension needed
tasks.jsontasks.jsonCompatible concept, different schema
launch.jsonNot yet (tasks only)Debugging support is in development
Integrated GitGit PanelInline blame, gutter indicators

Troubleshooting

Common Issues Reference
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