Your ultimate guide to setting up Zed with Vim mode, tailored settings, and key bindings for a seamless coding experience
Your ultimate guide to setting up Zed with Vim mode, tailored settings, and key bindings for a seamless coding experience
Your ultimate guide to setting up Zed Editor with Vim mode, tailored settings, and key bindings for a seamless coding experience
## IntroductionThe Zed Editor 101 setup guide is designed to help you configure Zed Editor to enhance your development workflow. Whether you’re a Vim enthusiast or looking to boost your productivity with custom settings and key bindings, this guide provides all the necessary steps and resources. Follow along to get your Zed Editor configured with Nerd Font, Vim mode, local AI assistance, and more.
Deploy the entire Zed configuration with a single command:
sh install.shThis backs up your existing settings.json, keymap.json, and tasks.json to a timestamped directory, then copies the repo versions into ~/.config/zed. To restore, run the cp command printed at the end.
Install Nerd Font using the following command:
curl -fsSL https://raw.githubusercontent.com/getnf/getnf/main/install.sh | bash
getnfThis setup uses zed-codemux as the default terminal shell, providing a multiplexer experience within Zed Editor. Install via:
cargo install codemuxThen configure in settings.json:
"terminal": {
"shell": {
"program": "/path/to/codemux"
}
}This setup integrates fff-gpui, a native-GUI fuzzy file finder and grep tool for Zed. It provides quick file navigation and project-wide search with a minimal TUI interface.
Install via:
brew tap th0jensen/fff-gpui
brew install fff-gpuiKeybindings:
| Keybinding | Action |
|---|---|
space f f |
Open interactive file picker |
space f g |
Open interactive grep search |
For detailed Vim mode setup instructions, refer to the Zed Vim Mode Documentation.
Update your settings.json file with the following configuration:
…LSP configuration recipes for rust-analyzer, gopls, vtsls, and biome are in example/lsp-settings.jsonc. Copy the relevant block into the "lsp" section of your settings.json to enable it.
| # | LSP Server | Language | Key Settings Demonstrated |
|---|---|---|---|
| 1 | rust-analyzer | Rust | checkOnSave, clippy checks, proc macros, inlay hints (binding, chaining, lifetime, type, parameter, reborrow) |
| 2 | gopls | Go | gofumpt, staticcheck, semantic tokens, analyses (nilness, fieldalignment), inlay hints |
| 3 | vtsls | TypeScript/JavaScript | Auto imports, inlay hints (parameter names, types, return types), organize imports, format config |
| 4 | biome | JS/TS/JSON/CSS | Formatter settings (indent, quotes, semicolons), linter, organize imports |
Each example showcases different LSP capabilities — diagnostics, formatting, code actions, inlay hints, and refactoring — useful for testing LSP integrations in Zed.
Example code files for each LSP server are available in the example/ directory to verify the features listed above.
Update your keymap.json file with the following key bindings:
…Update your tasks.json file with the following task definitions:
…The tasks above enable the space f f and space f g keybindings defined in Keymaps. They spawn fff-gpui with the current directory as root.
fff-gpui: Files — Opens an interactive file picker using fff-gpuifff-gpui: Grep — Opens an interactive grep search across project filesThis config already includes Ollama support via the language_models.ollama setting pointing at http://localhost:11434. To use local AI:
ollama pull llama3.2ollama serve (or launch the app)Zed automatically discovers pulled Ollama models through the api_url setting. No additional config is needed — the models appear in the agent model picker alongside cloud providers.
Refer to Zed's Ollama docs for more details.
sh cli.shHuynh Duc Dung
If this guide has been helpful, please give it a ⭐️.
Thanks goes to these wonderful people (emoji key):
Dung Duc Huynh (Kaka) |
d1y |
Naadiyaar |
Jan Lubojacký |
This project follows the all-contributors specification. Contributions of any kind welcome!
No open issues yet, or sync has not completed.