Feature Request - option to make local rename / cancel rename #7824
Replies: 5 comments
-
|
Thanks for the suggestion. Cancel should already be possible, if it's not showing up that would be a bug on us or VS code. |
Beta Was this translation helpful? Give feedback.
-
@rchiodo maybe I'm missing it, where is it located? When I do rename, it usually starts to work in background mode - I can see that loading thing above code editor, but that's all.
|
Beta Was this translation helpful? Give feedback.
-
|
There should be a progress notification in the bottom right. I see one when doing a 'save' sometimes. |
Beta Was this translation helpful? Give feedback.
-
|
Transferred to discussions for up votes. I have a potential solution here, but not sure we want to ship a single command for this: |
Beta Was this translation helpful? Give feedback.
-
|
one concern people have is that if this is mis-used, it could break code. if the symbol is public and other modules are using it, and user accidently rename it only locally, it will break all other modules. one workaround could be adding new command called something like "staged rename" and leave the official vscode rename as they are. and the new command will do local rename first and show pop up that says, want to proceed to global rename with exploration that it could break code if symbol is public. if user says No then stop, if user says Yes, then do rest of files. this way it is more explicit and require user consent. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
A problem I stumble upon from time to time, typically when working on some script, - I use rename to change some global variable in the script and then it takes ages to finish, because I guess it starts to examine the entire codebase to ensure this script is not used anywhere and this variable in particular.
Or sometimes I work on a new function in a public and either change its name or one of its arguments names and then again it takes forever to finish renaming process, though I may be know that it's okay to change this name just in current module (e.g. it's new or it's local to the current module). As a result I typically:
So, would be great to either have some kind of
Rename Symbol Localcommand available that would target only current module, without going to examining external references to the module, then it would be lighting fast and very convenient for some cases.Or at least to have an option to cancel renaming process, when you realize its taking too long and it's simpler to make changes using
Ctrl-H.Beta Was this translation helpful? Give feedback.
All reactions