Comment by f311a

1 day ago

Too bad they did not include better search UI into this release.

When you search, Zed opens a new tab, which I hate. Sometimes I just want to have a quick glance at some code and close the search using escape.

Telescope style search in vim, helix or JetBrains tools is so much better.

https://github.com/zed-industries/zed/pull/46478

Huh, I absolutely love Zed’s search UI. I just navigate back to my previous tab with ctrl-o when I’m done

  • Same, and then sometimes I navigate back to it again when I need it. The multi-cursor edit in the search results is a thing a beauty as well.

  • I love it too, but instantly knew it would be polarizing the first time I used it :)

Whereas I'm not a great fan of modals for anything where I'd like to refer back to what I'm working on. I guess I'd just prefer some tabs to open as a split by default and close with esc, maybe call them something like "ephemeral tabs"? Basically, steal some ideas from emacs.

  • in emacs with embark you can export the contents of an ephemeral buffer into a persistent one, which is the best of both worlds and more besides

    for file search, edit in the persistent buffer can rename files

    for grep, edits in the persistent buffer edit across files

    and so on

  • Tabs will still be supported. Also, when you search for references, it also opens a new tab, even when all references are in the same file.

    • That definitely sounds subpar to me. I suppose there's still a reason to keep paying for an IDEA Ultimate subscription.

This. I tried Zed for an entire month, but this "search thing" drove me nuts. It is also slow. If you work in a large project search is absolutely essential. Too bad.. Back to Visual Studio Code.

  • They both use ripgrep, weird for it to be slower? Especially with the multibuffer it's more pleasant to use

    • I think VSCode use ripgrep and Zed has its own ripgrep-like search. Zed likely still do more work per match due to the multibuffer. A normal nested tree-based result should be faster.

      I think multibuffer can be good in edit/renaming use cases, but it's very annoying for fast lookups/navigation across different files (as mentioned elsewhere).

I love the search in zed. If it was up to me it would open a new tab on every search rather than reusing the same tab, so that I didn't have to redo past searches.

The multibuffer result is so nice for "hands-on" search and replace.

  • I also disliked that and discovered you can toggle it with config now :).

Personally I don't hate tab. Sometimes even it's more convenient to have a tab on the side with all the state, instead of reopening modal.

What I hate though is really unintuitive and "non-standard"[1] shortcuts in search tab.

For example "find in project": cmd+shift+f

Whereas for "find and replace in project" I'd expect: cmd+shift+r , but it's: first toggle find, then toggle find and replace. Ok, absolutely fine, but the keyboard shortcut to toggle is: cmd+shift+h - I never can remember it.

When already searching, for my "convenience", if I'd like to adjust my search or search for something new, I click cmd+shift+f and I am focused back to find input, but here's the kicker. Input have automatically changed to what word was under my cursor. So if I was looking for some long or weird string, I need to retype it again or find and copy/paste it again.

#first-world-problems though.

I got tired of babysitting vim/neovim and all it's plugins and use Zed for most of my editing. It has pretty good vim binding support and maybe I just need to remap some key bindings to have better search experience. Zed is much better at emulating vim than Cursor/VSCode.

[1] there's no standard obviously, but some things are the same/similar across most programs.

  • I was like: "it should be Ctrl+Shift+H, of course, right?"

    So different tastes :-)

    What you describe later is "Auto-populate the find dialog with current text under cursor". VSCode has a setting for that; I guess Zed will eventually end upnadeing one too.

  • They have presets from other IDEs and editors. I use a weird combination of Jetbrains and helix shortcuts with helix mode. Because I used them the most.

> Sometimes I just want to have a quick glance at some code and close the search using escape.

How else are you going to have “a quick glance at code” *across* project files without using a new view for that? It sounds like you’re describing something impossible.

Zed’s across files search solves this in a similar way as other tools. Except that in zed you can also edit the code where your search results show up. Zed also has within file search.

  • Look at how Jetbrains IDEs do it. It's a solved UX problem, as far as I'm concerned.

    Jetbrains opens up a lightweight floating panel which can also be docked. So you can choose how to view the results. Like Zed, the results view is live editable, even when searching across multiple files.

    The floating panel mode is good because you can do a quick search, look at it, and just whisk it away with one key. Opening results as a tab isn't terrible, but mixes one UI (search, very ephemeral) with another (editing, less ephemeral). (Zed also has this thing where search results also show in the right-hand side panel, which I've always found confusing.)

    Another thing Jetbrains does better here is to remember your search settings. Your last search is always the default, whereas Zed forgets it every time. Jetbrains also has really nice file scoping via a dropdown, so it's very quick to search all non-test files, for example.

    Zed keeps stealing great features from Jetbrains, so I'm sure it's just a matter of time before this gets better.

  • > How else are you going to have “a quick glance at code” across project files without using a new view for that?

    By showing the text around match inline with the search result in the tree. Especially useful if you do not expect to edit every search result. If you do expect to edit every search result, then Zed's multibuffer is arguably better/ faster.

  • Just look at the PR, it's shows how it will look like. It's modal instead of a persistent tab.

I can’t relate to that, I’ve also struggled with this decision for quite some time, but I’ve gotten used to it. What I hate is that it doesn’t open several search tabs if I need to look for several things at once.

> When you search, Zed opens a new tab, which I hate.

You also have to validate the search, it doesn't start off immediately on its own, which annoys me a lot more.

I know not much about Zed and I am curious, can such changes be implemented via extensions?

  • No, Zed's extension API is very limited at the moment. In particular, it does not allow adding any new GUI elements.

That was og sublime/textmate behavior that I grew to miss with vscode, so was pleasantly surprised to see it exists in Zed.

yeah its quite silly they decided to mess around with this universally standard behaviour. The search is the reason why i always end up going back to other vs code based IDEs for real work. I open zed for perf reasons and something quick.

Also now they've introduced this "agent first" layout which i cannot undo. They're strength is in perf, idk why try to reinvent the wheel w.r.t DX.

  • > Also now they've introduced this "agent first" layout which i cannot undo

    You can just collapse the sidebar with the agentic stuff.