4 ms·
I don't use Zed, but I noticed José Valim using it when he was live streaming a coding session. I mostly use VSCode, but one feature he used in Zed was really c
by losvedir 3y ago
I don't use Zed, but I noticed José Valim using it when he was live streaming a coding session. I mostly use VSCode, but one feature he used in Zed was really compelling: he did a "Find All", which was similar to VSCode in that it opened a results pane with snippets from all the files that matched, but then he was able to edit the snippets directly from there, and was able to use multi-cursor editing and all the other usual niceties. That was pretty neat and impressive to me, since in VSCode you have to actually click the search result to open the file, and then edit it there. It wasn't quite enough to make me switch, but I've been thinking about it from time to time whenever VSCode annoys me.
- czottmann 3y agoThis sounds like it could be very useful. Does it work like this VSCode extension, "Search Editor: Apply Changes"? https://marketplace.visualstudio.com/items?itemName=jakearl.search-editor-apply-changes https://marketplace.visualstudio.com/items?itemName=jakearl....
- losvedir 3y agoMmm, -ish. I searched for an extension in VSCode when I saw it in Zed, and that extension came up. But it looks like you still have to open the editor tab to save it and stuff. It was much more streamlined in Zed. You just made the change right there, and I think if you hit "save" on the search results it would save to all the files that you touched.
- hprotagonist 3y agoemacs has had occur and multi-occur since the 80s that can do this. it’s amazing. more recently, interfaces to tools like ripgrep also have the ability to have an editable mode, super handy for refactoring. (and of course you can edit file names in bulk, too ..) https://www.masteringemacs.org/article/searching-buffers-occur-mode https://www.masteringemacs.org/article/searching-buffers-occ... https://rgel.readthedocs.io/en/latest/ https://rgel.readthedocs.io/en/latest/ https://www.gnu.org/software/emacs/manual/html_node/emacs/Wdired.html https://www.gnu.org/software/emacs/manual/html_node/emacs/Wd...
- difflens 3y agoHmm maybe I don't understand fully, but can't you do this in VSCode by doing a `Find And Replace All`? (Cmd + Shift + F on Mac)
- fatboy 3y agoIn VSCode if you do super-shift-f for find-in-project, at the top of the results pane, just right of where it's marked "x results in y files" there's a link button titled "Open in editor" which I believe does what you're describing. I'd actually forgotten about it until I read your comment so I'll start using it again now.
- losvedir 3y agoI don't seem to have that. There's nothing to the right of my "x results in y files" summary. Maybe you have an extension installed?
- zokier 3y agohttps://code.visualstudio.com/docs/editor/codebasics#_search-editor https://code.visualstudio.com/docs/editor/codebasics#_search...
- losvedir 3y agoOh, is that what they mean? I set "Search Mode" to "newEditor" immediately whenever I configure VSCode on a new computer, since the default behavior of opening in the side panel is such hot garbage. I entirely forgot that some people don't have that and took for granted in my post that everyone knew about opening the results in an "editor". But the point is that "editor" is non-functional. It's nice for browsing the results and has syntax highlighting and surrounding context, but you can't actualy edit from there. You can only use it to open the source file and then edit the source file. In Zed, the search results "editor" is actually functional. You can make changes to the text that you see from the surrounding context, right in the search results, and then hit save, and have those changes propagated to all the touched files. So, say you update a function to take another argument, and you want to update your codebase appropriately. Well then you do a global search for that function name, and then scan down the results list. The irrelevant search results (maybe you mention the function in a comment, but aren't actually invoking it) you can skip. The complicated updates you can open the source file like you do in VSCode. But the trivial ones where you can see what you need to pass as the new argument, you can just update right then and there.
- quickthrower2 3y agoThat is neat. It would avoid the need to craft regex in many case. One of my favourite tricks is multi cursor, edit and use end of line or next word shortcuts to make bulk edits. Doing that across files would be cool!
- brigadier132 3y agoJetbrains ides already do this. It's absurd but one of the primary reasons I use Jetbrains over vscode is because i can search for a directory and open it in the navigation pane.
- derekperkins 3y agoI've never seen that functionality in JetBrains, which has been my main driver for years. I hope it's there