Previous editions of Hidden Gems featured tips from across the team and community.
This time, I'm covering my most-used hidden features—ones I think you'll find useful too.
No need for a longer introduction—let's mine some gems!
🪨⛏️➡️💎
By default, Zed treats the project search multibuffer like a singleton per pane.
If you already have a project search open in the current pane, using cmd-shift-f (macOS) / ctrl-shift-f (Windows / Linux) will simply refocus the existing search tab.
If you want multiple project search tabs, here are a couple of ways to do it.
In your existing project search tab, type a new query.
Instead of hitting enter, use cmd-enter (macOS) / ctrl-enter (Windows / Linux).
This corresponds to the project search: search in new command palette action.
You can also adjust the project search keybinding to launch in a new tab rather than refocusing the existing one.
{ "context": "Pane", "bindings": { "cmd-shift-f": "workspace::NewSearch" // or whatever binding you please }}
Note that Zed will still refocus the existing search tab if no search has been performed in it yet.
If you're into multi-cursor editing, you frequently run commands like editor: select next and editor: select all matches to select other snippets matching what is under your current selection.
You responsibly review your selections to ensure you've not captured anything unintended before you start jumping over subwords and replacing text.
The catch is, reviewing selections that are spread out over potentially thousands of lines of code can be a drag.
Instead of scrolling through all those lines, open the command palette and run editor: open selections in multibuffer.
Now, all of your selections are just a few lines apart from one another.
Scattered selections consolidated into a multibuffer
Zed has a settings profile system that lets you define alternative setting values you can toggle on the fly.
I have profiles configured to quickly adjust Zed for social media screenshots.
Here are a few:
Duplicate code with subtle variations is common in any sizeable codebase.
When it's time to consolidate those chunks into a function, figuring out the exact differences can be tedious—especially with larger blocks.
In Zed, you can copy one block to the clipboard, select the other, and run editor: diff clipboard with selection from the command palette.
The diff shows you exactly what needs to become a parameter in your refactored function.
Diff view comparing clipboard contents with selected code
Zed's keybinding system has a fairly obscure yet powerful action: action::Sequence.
It's an action that lets you chain multiple actions under one keybinding.
I use one to automate Danilo's writing-focus tip—it closes all docks and inactive files, then toggles a centered layout so I can focus on writing without distractions.