-
Notifications
You must be signed in to change notification settings - Fork 203
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
Apply rename in one editor transaction #157
Comments
👍 tips on how to do that? I'd be tempted to take a whack at it. I did it on our codebase during a demo and it quickly became non manageable |
@basarat, If I don't get to it first, basically wrap the application of each call to editor to do a rename in https://atom.io/docs/api/v0.186.0/TextEditor#instance-transact. Set the grouping interval to 1ms and since you are doing sync changes they should all group together. You may need to extend the grouping interval. |
I'm not sure about the grouping interval code though atom/find-and-replace#108. Couldn't find it using my phone ❤️ |
@basarat, I was mostly complaining about having to undo multiple changes in one file. But no there does not appear to be a cross editor undo capability, ctrl-z just undos the current editor by design so it really would be weird if suddenly an undo reverted multiple editors. Maybe a library to track and manage undo history project wide would be useful. |
find and replace doesn't use a grouping interval. Neither should we : https://github.com/atom/find-and-replace/blob/3386d13e412623bf64cc9001586db35a19364b58/lib/find-model.coffee#L59 it is optional 👍 |
…so you can undo the entire file with one undo closes #157
…so you can undo the entire file with one undo closes TypeStrong/atom-typescript#157
Rename applies changes as individual changes and undo takes way to long. Roll undo into one transaction so that it is one undo step.
The text was updated successfully, but these errors were encountered: