We're back with more hidden gems to help you unearth some productivity wins in Zed. This time around, we've included some of your hidden gems, and tasks seem to have stolen the show. Let's dig in! 💎
Adjust Task Commands on the Fly
Sometimes, the tasks provided by an extension get most of the command right, except for a small part that needs to be changed.
For instance, I like how cargo --foo path-to-module --bar --something is created for my tests, but sometimes I want to see a backtrace of the failure.
Yet, there's no "run this test with backtraces on" task in the extension.
Luckily, all Zed tasks end up being run in the terminal, so the command can be customized before running.
When selecting a task in the modal (task: spawn in the command palette), you'll see a list of available tasks:

Pressing tab expands the task into its full command:

Here, I can edit the task however I need to, e.g., add RUST_BACKTRACE=1 in my case.
Then, another task feature comes in very handy: oneshot tasks.
Pressing alt-enter in the task modal spawns whatever is in its input right now, thus running my tests with backtraces enabled.

This modified task is saved to the modal's history, where it can be rerun or removed as needed.

Add Run Buttons for Bun Tests
If you're a JS/TS developer who uses Bun, here's how to configure Zed to run your tests.
Add the following to your tasks.json file:
[
{
"label": "Bun Test",
"command": "bun test",
"args": ["\"$ZED_RELATIVE_FILE\" -t=\"$ZED_SYMBOL\""],
"tags": ["js-test", "ts-test", "bun-test", "tsx-test"]
}
]Now, clicking the play buttons in the gutter will run your tests with Bun:

Flair for Files
Zed ships with a set of monochrome file icons.

These are nice, but if you're looking to bling out your project panel:
- Open the extensions view (command palette ->
zed: extensions) - Search for
Catppuccin Icons - Hit the
Installbutton - Open the Icon Theme selector (command palette ->
icon theme selector: toggle) - Pick your favorite
Catppuccinvariant

Now your project panel has clear visual distinctions between file types.
Bonus tip: You can add icons to your tabs as well!
Configure this setting in Zed right now, or manually add the following snippet to your settings.json.
"tabs": { "file_icons": true }Emulate Vim's Telescope via Television
-
Install
television -
Add the following to
tasks.json{ "label": "Television File Finder", "command": "zed \"$(tv files)\"", "hide": "always", "allow_concurrent_runs": true, "use_new_terminal": true } -
Bind the custom task to a keybinding in your
keymap.json. In this case, we'll override the keybinding forfile finder: toggle.{ "bindings": { "cmd-p": [ // Or `ctrl-p` "task::Spawn", { "task_name": "Television File Finder", "reveal_target": "center" }, ], }, }, -
Press
cmd-p(macOS) /ctrl-p(Windows, Linux)
Television file finder
Launch Terminal with Project-Specific tmux Sessions
If you're a tmux user, you can configure Zed to automatically attach to a project-specific tmux session when you open the terminal.
Add the following to your settings.json file:
"terminal": {
"shell": {
"with_arguments": {
"program": "/bin/zsh", // or path to your preferred shell
"args": ["-c", "tmux new-session -A -s \"$(basename \"$PWD\")\""]
}
}
}This is great for those who prefer keyboard-driven workflows for selecting, copying, and navigating inside the terminal.

Mapping Unknown File Types to Known Languages
Out of the box, Zed can recognize most common languages based on a file's extension.
It knows to both apply JavaScript syntax highlighting and start a JavaScript language server if the file has .js as its extension.
Zed will treat files with extensions it doesn't recognize, such as .jsm, as plaintext files; however, you can tell Zed to treat these files as ones it understands through the language selector (command palette -> language selector: toggle -> JavaScript).
Great! However, there is one drawback—this is only a temporary override.
Zed will forget about this association the moment you close this file.
To persist this association, you can configure a mapping via the file_types setting:
"file_types": { "JavaScript": ["*.jsm"] }Now, every time you open a .jsm file, it will be treated as a .js file.
file_types supports glob patterns; see more examples in the documentation.
It is always best to first browse Zed's extension store (command palette -> zed: extensions) to see if direct support for your language already exists, but if it does not, file_types is a great workaround.
Digging Deeper
If you develop for Apple platforms or use Maya for 3D work, check out these in-depth task-based guides from the community:
- Build, run and debug iOS and Mac apps in Zed instead of Xcode
- Now you can test Xcode apps and Swift packages in Zed
- Setting Up the Zed Editor for Maya Python
Share Your Hidden Gems
Let us know which of these gems you found most useful, and please share your gems, so we can adopt the tips you can't live without.
Related Posts
Check out similar blogs from the Zed team.
Looking for a better editor?
You can try Zed today on macOS, Windows, or Linux. Download now!
We are hiring!
If you're passionate about the topics we cover on our blog, please consider joining our team to help us ship the future of software development.