SAFI.DEV
Back to Blog

24 Zed Editor Hidden Gems That Made Me Drop VS Code for Good

8 min read

24 lesser-known Zed editor features — multi-cursor tricks, task runners, keybindings, and workflows the docs barely mention but you'll use every day.

Zed editor window showing multi-cursor selections, a task runner panel, and the command palette open with hidden features
Table of Contents

Zed merges around 900 pull requests a month. Most of the good stuff never makes the release notes. The official Hidden Gems series — three posts, 24 features — is the closest thing to an unofficial power-user manual.

I read all three. Then I pulled the features I actually use, dumped the rest, and grouped what's left by what you're trying to do. That's this post.

If you're new to Zed and looking for the migration story instead, start with Migrating from VS Code to Zed: The Honest Walkthrough for Switchers. Or the speed pitch — Zed 1.0 Is Here.

Otherwise, let's go.

Run tests faster than you can switch to the terminal

This is the section that paid for itself in the first week.

1. editor: spawn nearest task — the rerun-this-test hotkey

Bind this action to a single key. Now your "run the test under my cursor" loop is one keystroke. Refactor, hit the key. Refactor, hit the key. No mouse, no terminal switch, no scrolling to find the run button.

I bound it to cmd-shift-t. After three days I forgot how I ever lived without it.

2. Bun test gutter buttons

For Bun projects, drop this into tasks.json:

[
  {
    "label": "Bun Test",
    "command": "bun test",
    "args": ["\"$ZED_RELATIVE_FILE\" -t=\"$ZED_SYMBOL\""],
    "tags": ["js-test", "ts-test", "bun-test", "tsx-test"]
  }
]

You get a play button in the gutter next to each test. Click it. Done. No CLI, no remembering the test name.

3. Adjust task commands on the fly

Run task: spawn from the command palette. Press tab to expand the full command. Edit it. Press alt-enter to run it as a one-shot.

Why this matters: half the time I want to run my test command but with a --bail or --watch flag tacked on. Before I'd open the terminal, scroll through history, edit the line. Now it's three keystrokes inside Zed and the modified command lands in history for later.

Multi-cursor moves that feel like cheating

Zed has at least four ways to spawn cursors. Most people use one. Here are the ones worth learning.

4. Select every regex match with one keystroke

Open buffer search. Toggle regex on. Type your pattern. Hit Alt+Enter.

Every match is now a cursor. Edit them all at once. This is the move for "rename every variable that matches this shape" without touching an LSP.

5. editor: split selection into lines

Highlight twenty lines. Run the action. You now have one cursor per line. Type — every line gets the same edit.

This is the trick for prefixing a list, fixing indentation, or wrapping every line in quotes. Once you internalize it you'll stop reaching for sed.

6. editor: open selections in multibuffer

Different problem. You've made multi-cursor selections scattered across a 2000-line file and you want to see them all in context before you commit to the edit.

Run this action. Zed pulls every selection into a multibuffer view. Review, then edit. It's the difference between bulk-editing with confidence and bulk-editing with a prayer.

7. editor: diff clipboard with selection

Copy a chunk of code. Select another chunk. Run the action. Zed shows you the diff.

I use this constantly during refactors — "did I actually change anything in this function or did I just move whitespace?" One action, instant answer.

Search and navigate without breaking flow

8. Multiple project search tabs

VS Code's search panel is a single panel. You search, you lose the previous search. Zed lets you spawn multiple search tabs.

Hit cmd-enter (macOS) / ctrl-enter (Windows/Linux) when starting a new search. Or rebind the default to workspace::NewSearch. Now you can keep "all uses of getUser" open while you separately hunt for "where is User.email set" in another tab.

9. Outline modal with spaces

Hit Cmd+Shift+O for the outline modal. Then include a space in your search. That changes the filter from "match symbol names" to "match contextual keywords" — so pub fn finds every public function, trait finds trait definitions.

I learned this from the post and immediately stopped grepping for trait.

10. Open files in a new pane

Hold Cmd/Ctrl when clicking a file in the project panel or file finder. It opens in a new pane on the right instead of replacing your current file.

This is the move for "I want to read X while keeping Y visible" — code review, copying between files, comparing two implementations.

11. Compare marked files

In the project panel, mark two files. Right-click → Compare marked files. Inline diff, no third-party tool, no shell command.

Bend the editor to your hand

12. Wrap an expression in dbg!() with a keybinding

Conrad Irwin's Rust trick: bind a Vim-style sequence (he uses \d) that wraps the current expression in dbg!(), and another that strips it. Toggle debugging on any expression instantly.

You can adapt this for any language — wrap in console.log(), print(), dump(), whatever your stack uses. The keybinding system is general; the wrapper is just a snippet.

13. action::Sequence — chain multiple actions under one keybinding

This is the underrated one. Bind a single key to a sequence of actions:

  • close all docks
  • close inactive tabs
  • toggle centered layout

Now you have a "writing mode" hotkey. Or a "demo mode" hotkey. Or a "screenshot mode" hotkey.

I built one for screen recordings — closes everything, centers the editor, bumps the font. One key.

14. Settings profile selector

Define multiple settings profiles. Toggle between them with settings profile selector: toggle.

I run two: a coding profile (14pt font, full LSP, dark theme) and a writing profile (18pt font, no LSP, sepia theme). Cmd+K, type "profile", switch. Beats editing JSON every time.

15. Editing micro-optimizations you'll use 200 times a day

  • cmd-enter / ctrl-enter → new line below, cursor stays put for the next action
  • cmd-shift-enter / ctrl-shift-enter → new line above
  • macOS bonus: fn-delete → forward delete (the Mac keyboard's missing Del key)

Tiny on paper. Massive when you do it 200 times a day.

16. Auto-save on focus change

"autosave": "on_focus_change"

Every time you tab away from the editor — to the terminal, the browser, Slack — Zed saves. Combined with a hot-reload dev server this is the closest thing to live editing without paying for it.

17. Copy and trim

Right-click selected text → Copy and trim. Strips the leading/trailing whitespace before copying.

The "I copied an indented block and now it's mangled when I paste it elsewhere" problem — solved.

Tasks, integrations, and the file finder you actually want

18. Lazygit as a task

Drop Lazygit into ~/.config/zed/tasks.json, bind it to Cmd+Shift+G, and you have a full git TUI inside the editor. No terminal switch, no separate window. The keybinding works from anywhere.

19. Television (Telescope-style file finder) bound to cmd-p

If you came from Neovim and miss Telescope, install television, add it as a task, and rebind cmd-p / ctrl-p in keymap.json to launch it. You get fuzzy finder behavior that ranks better than Zed's default for big repos.

20. tmux session per project, automatically

In your terminal settings:

"args": ["-c", "tmux new-session -A -s \"$(basename \"$PWD\")\""]

Every time you open Zed's terminal, you're attached to a tmux session named after the project. Close Zed, reopen it tomorrow, your session is still there with all your panes. This single line replaces a startup script I'd been maintaining for two years.

21. Map unknown file types to languages

"file_types": {
  "JavaScript": ["*.jsm"],
  "TypeScript": ["*.cts"]
}

Glob patterns supported. Stop manually setting language mode every time you open a .jsm file.

22. Catppuccin file icons

The default icon theme is fine. The Catppuccin Icons extension is better. Install it via the extensions view, pick your variant, and bonus — turn on tab file icons in settings so you can read your tab strip at a glance.

Cosmetic, but you stare at it 8 hours a day. Worth the 30 seconds.

Writing-mode setup (for prose, docs, blog posts)

23. The three actions that turn Zed into a writing app

Bind a sequence to one key (using action::Sequence from #13):

  • workspace: close all docks
  • workspace: close inactive tabs and panes
  • workspace: toggle centered layout

Boom — distraction-free writing mode. I'm writing this post in it right now.

24. The Vim dbg!() wrap, but for prose

Steal the keybinding pattern from the Rust trick and rebind it for prose tasks: wrap a selection in **bold**, in *italic*, in a [link](url). The keybinding system doesn't care that you're writing markdown instead of Rust.

I have \b for bold, \i for italic, \l for link. Three custom bindings. Hours saved.

Frequently asked questions

What are the most useful hidden features in the Zed editor?

The most useful hidden Zed features are task spawning with editor: spawn nearest task, multi-cursor expansion via editor: split selection into lines, regex select-all with Alt+Enter in buffer search, and settings profiles you can swap mid-session. Together they cover testing, bulk editing, and context switching — the three things developers do hundreds of times a day.

How do I run tests in Zed without leaving the keyboard?

Use the editor: spawn nearest task action. It finds the nearest test under your cursor and runs it in the integrated terminal. Bind it to a single keybinding and you have a "rerun this test" hotkey that works across Rust, JavaScript, Bun, Python, and any language with a configured task runner. For Bun specifically, add a tasks.json entry with the js-test, ts-test, and bun-test tags to surface gutter run buttons.

Can I use multi-cursor editing in Zed like VS Code or Sublime Text?

Yes — and Zed gives you more entry points. Run buffer search with regex on, hit Alt+Enter to select every match. Use editor: split selection into lines to drop a cursor on every line of a selection. For scattered selections across a file, run editor: open selections in multibuffer to gather them into one focused view before bulk editing.

How do I switch between different Zed configurations without editing settings.json?

Use settings profiles. Define each profile in your settings, then run settings profile selector: toggle to swap them on demand. This is the cleanest way to flip between a "writing" profile (large font, no language servers, centered layout) and a "coding" profile (smaller font, full LSP) without restarting or hand-editing JSON.

Does Zed support Lazygit and tmux integration?

Yes, through the task system. Add Lazygit as a task in ~/.config/zed/tasks.json and bind it to a key like Cmd+Shift+G. For tmux, set your terminal shell args to ["-c", "tmux new-session -A -s \"$(basename \"$PWD\")\""] so each project gets its own attached session automatically. Both feel native once they're wired up.

What to do now

Don't try to install all 24 in one sitting. You'll forget half of them by Friday.

Pick three. Use them for a week. When they become muscle memory, come back and grab three more.

If I had to pick the starter pack:

  1. editor: spawn nearest task — bind it to a key, change your testing life
  2. Settings profiles — coding vs. writing vs. demo, swap on demand
  3. Auto-save on focus change — the smallest config line with the biggest payoff

Once you've internalized those, the multi-cursor and task tricks are next. By month two you'll be writing your own action::Sequence chains and wondering why anyone tolerates the alternative.

If you're still on VS Code and reading this thinking "fine, but I'd lose my extensions," I covered that exact decision in Migrating from VS Code to Zed — including which VS Code workflows have a Zed equivalent and which don't.

And if you're in a vibe-coding workflow with Claude Code on top of Zed, The Ultimate Claude Code Workflow Guide is the next stop — these editor tricks compound when an agent is the one driving the keyboard half the time.

GET IN TOUCH

Let's Build Something Together

Whether you have a project idea, want to collaborate on a web or mobile app, or just say hello

Get in Touch safi.abdulkader@gmail.com