Zed
High-performance code editor with real-time collaboration.
Official WebsiteFeatures
Installation
brew install --cask zedWhy Use Zed?
Zed is a next-generation code editor built by the creators of Atom and Tree-sitter. Written in Rust, it's characterized by incredible speed and real-time collaboration features.
Lightning Fast
Written in Rust with GPU rendering. Startup, scrolling, and searching are blazingly fast.
Real-time Collaboration
Edit simultaneously like Google Docs. Share screen, voice calls, and cursor positions.
AI Assistant
Integrated with Claude, GPT-4, Gemini. Code generation, refactoring, and Q&A within the editor.
Built-in Terminal
Fast integrated terminal. Run commands, build, and test without leaving the editor.
Installation
# macOS (Homebrew)
brew install --cask zed
# macOS (from official site)
# Download from https://zed.dev/download
# Linux (official install script)
curl -f https://zed.dev/install.sh | sh
# Linux (Flatpak)
flatpak install flathub dev.zed.Zed
# Check version (after launching GUI)
# Zed > About Zed
# Install CLI tools
# Zed > Install CLIBasic Operations
# Open a file
zed filename.txt
# Open directory (project)
zed .
zed ~/projects/myapp
# Open multiple files
zed file1.txt file2.txt
# Open and jump to line
zed filename.txt:10
# Open in new window
zed -n filename.txt
# Add new project to existing window
zed -a ~/another-projectFrequently Used Keyboard Shortcuts
File Operations
| Key | Description |
|---|---|
Cmd+P | Quick open file |
Cmd+Shift+P | Command palette |
Cmd+S | Save file |
Cmd+W | Close tab |
Cmd+Shift+E | Toggle project panel |
Cmd+B | Toggle sidebar |
Editing
| Key | Description |
|---|---|
Cmd+D | Add next same word to selection |
Cmd+Shift+L | Select all matching words |
Alt+Click | Add multi-cursor |
Cmd+Shift+K | Delete line |
Alt+Up/Down | Move line up/down |
Cmd+/ | Toggle line comment |
Cmd+Shift+D | Duplicate line |
Cmd+Enter | Insert new line below |
Navigation
| Key | Description |
|---|---|
Cmd+G | Jump to line number |
Cmd+Shift+O | Jump to symbol |
F12 / Cmd+Click | Jump to definition |
Shift+F12 | Find references |
Ctrl+- | Go to previous location |
Cmd+Shift+F | Search entire project |
Panels and Terminal
| Key | Description |
|---|---|
Ctrl+` | Toggle terminal |
Cmd+Shift+T | New terminal tab |
Cmd+\ | Split editor |
Cmd+1/2/3 | Switch to corresponding tab |
Configuration
Zed configuration is stored in ~/.config/zed/settings.json. Open it with Cmd+,.
{
// Theme settings
"theme": "One Dark",
"buffer_font_family": "JetBrains Mono",
"buffer_font_size": 14,
"ui_font_size": 14,
// Editor settings
"tab_size": 2,
"soft_wrap": "editor_width",
"show_whitespaces": "selection",
"relative_line_numbers": true,
// Format
"format_on_save": "on",
"formatter": "language_server",
// Auto-save
"autosave": {
"after_delay": {
"milliseconds": 1000
}
},
// File scan exclusions
"file_scan_exclusions": [
"**/node_modules",
"**/.git",
"**/target",
"**/dist"
],
// Telemetry
"telemetry": {
"diagnostics": false,
"metrics": false
},
// Enable Vim mode
"vim_mode": true,
// Terminal settings
"terminal": {
"font_family": "JetBrains Mono",
"font_size": 13,
"shell": {
"program": "/bin/zsh"
}
},
// AI assistant settings
"assistant": {
"default_model": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022"
},
"version": "2"
},
// Inline completions
"show_inline_completions": true,
// Git settings
"git": {
"inline_blame": {
"enabled": true
}
},
// Language-specific settings
"languages": {
"TypeScript": {
"tab_size": 2,
"formatter": "prettier"
},
"Python": {
"tab_size": 4,
"formatter": {
"external": {
"command": "black",
"arguments": ["-"]
}
}
}
}
}Keymap Configuration
Customize keybindings in ~/.config/zed/keymap.json.
[
{
"context": "Editor",
"bindings": {
// Custom keybindings
"ctrl-s": "workspace::Save",
"ctrl-shift-s": "workspace::SaveAll",
// VS Code-style keybindings
"ctrl-shift-k": "editor::DeleteLine",
"alt-up": "editor::MoveLineUp",
"alt-down": "editor::MoveLineDown",
// Duplicate line
"ctrl-shift-d": "editor::DuplicateLine"
}
},
{
"context": "Workspace",
"bindings": {
// Toggle sidebar
"ctrl-b": "workspace::ToggleLeftDock",
// Terminal
"ctrl-`": "terminal_panel::ToggleFocus"
}
},
{
// Custom bindings for Vim mode
"context": "vim_mode == normal",
"bindings": {
"space f f": "file_finder::Toggle",
"space f g": "workspace::NewSearch",
"space e": "project_panel::ToggleFocus"
}
}
]Collaboration Features
Use Zed's real-time collaboration to edit simultaneously with team members.
# How to Use Collaboration
1. Sign In with Zed Account
- Zed > Sign In with GitHub account
2. Share Project
- Run "Share Project" from Cmd+Shift+P
- Link copied to clipboard
3. Join Shared Project
- Click the shared link
- Or use Cmd+Shift+P "Join Call"
# Collaboration Features
- Real-time cursor position display for other users
- Shared selections
- Voice calling available
- Screen sharing
# Collaboration Shortcuts
Cmd+Alt+M : Toggle mute
Cmd+Alt+S : Start/stop screen share
Cmd+Alt+F : Follow participantAI Assistant
Zed has a built-in AI assistant for code generation and refactoring.
# How to Use AI Assistant
1. Open Assistant Panel
Cmd+? or Cmd+Shift+P → "assistant: new context"
2. Inline Assist (for selected code)
- Select code
- Press Cmd+Enter to activate inline assist
- Enter your prompt
3. Common Prompt Examples
- "Explain this function"
- "Refactor this code"
- "Add error handling"
- "Write a test for this"
- "Add TypeScript types"
# Specify API Key in Settings
# settings.json
{
"assistant": {
"default_model": {
"provider": "anthropic", // or "openai"
"model": "claude-3-5-sonnet-20241022"
}
}
}
# Set Anthropic API Key
# Zed > Settings > Anthropic API KeyExtensions
Zed keeps the extension system simple to maintain performance. Open the extensions panel with Cmd+Shift+X.
# Install Extensions
1. Open extensions panel with Cmd+Shift+X
2. Search and click "Install"
# Popular Extensions
- html : HTML language support
- emmet : Emmet expansion
- dockerfile : Dockerfile support
- prisma : Prisma ORM support
- astro : Astro framework support
- svelte : Svelte support
- vue : Vue.js support
- tailwindcss : Tailwind CSS IntelliSense
- sql : SQL support
# Manage Extensions
:extension list # List installed
:extension install xxx # Install
:extension uninstall xxx # UninstallTips
- •Enable
vim_modefor Vim keybindings. Runs smoother than VS Code. - •Use
Cmd+K Cmd+Sto view keyboard shortcuts. Great for customization reference. - •During collaboration, use
Cmd+Alt+Fto follow other users. Perfect for pair programming. - •The AI assistant activates inline with
Cmd+Enter. Get edit suggestions directly for selected code. - •Enable
format_on_savefor automatic formatting on save. Prettier integration works smoothly. - •Zed is actively developed with weekly updates. Keep it updated regularly.
- •Migrating from VS Code is easy. Keybindings are similar and LSP settings are recognized automatically.