-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to undo/redo edits across multiple files #638
Comments
Yeah, we never got around doing that... |
@alexandrudima pretty please ;-) |
I agree this would be nice to have :) |
I just got bit by this: did a global search, 96 results in 6 files. This was the first day using vscode. In the file explorer, there was an odd icon that I thought was to expand/contract the results in one of the 6 files. So I used that a few times just checking out how vscode worked. Imagine my surprise when I searched again for the same word and got no results! At first I thought it was a configuration that left those files out of the subsequent searches. Then I found out it was the result of "replacing" the search response with a blank replace field! I.e. deleting the search word. Then I found it was not undo-able! And no warning like if I had tried to do a replace in all 6 files. Luckily I had thought to copy over a folder to test vscode, so no data lost. Whew. I also use Dropbox which would also have let me restore the files. But this seems to be both a questionable UI/UX, and a serious design flaw. The editor I used before (atom) did not have an option to replace only in the given file. I would at least offer a pop-up when doing an irrevertible action. Is there a setting I could use to make sure I don't inadvertently fall prey to this if I do chose to continue on with vscode? |
Edit: I just noticed this only happens if I click on the search field's arrow icon exposing the Replace field. So a vanilla search is safe, but if you drop down the replace field, the odd icon appears that performs the replace in the given file. Clicking the small square icon to the left of the X will replace all within that file. |
Here's a possible UX change:
.. or simply use a "are you sure" dialog to replace all in that file. It is odd having both a [] icon and an X icon so close to each other as well. |
Agreed on this. VSCode simply can not be used for large refactors as is. I have to open up WebStorm (which will undo everything from that refactor command). |
This has been implemented for workspace edits, i.e. rename across files -- test plan item - #91248 |
When you do a rename operation that makes edits in multiple files, undo does not correctly undo the edits in files other than the active document.
Rename from the usage of
foo()
tofoo3
. Then undo. The code now reports errors on the import because the definition ina.ts
is stillfoo3
.I believe this affects any extension which provides a
WorkspaceEdit
crossing multiple files.The text was updated successfully, but these errors were encountered: