wmaurer / vscode-change-case

Change Case Extension for Visual Studio Code
MIT License
350 stars 37 forks source link

Doesn't work with rename refactorings (e.g. TypeScript) #17

Open mindplay-dk opened 7 years ago

mindplay-dk commented 7 years ago

I can't use this plugin for e.g. TypeScript code, since it merely replaces the text in the file - as opposed to e.g. invoking a rename refactoring.

I don't know if there's a general API to trigger renaming a symbol in VS code, or if the API for each language is completely internal/proprietary to each language module?

PhiLhoSoft commented 5 years ago

I came here for this bug, specifically. Indeed, the plugin is useful in general, but if you rename an identifier, you might expect the rename to be applied everywhere the identifier is used. I tried "click on name, hit F2 (rename), use the shortcut I defined", but then the focus goes out of the renaming which closes, and the case change is applied only on the selected occurrence. Current workaround is to do the case change, copy the generated identifier, undo the change, do the renaming, paste the copied name... A bit long.

niktor76 commented 3 years ago

I am here for the same reason. I would love it to have change-case inside the "rename symbol" input field.

stealthrabbi commented 2 years ago

Yes, I'm in python trying to change parameter names. I can use this extension to rename the parameter, but none of the references to the variable change with the rename.

elazarcoh commented 5 months ago

Might be able to use: vscode.commands.executeCommand('vscode.executeDocumentRenameProvider' ,...).

source: https://stackoverflow.com/a/46854791