vscode-change-case icon indicating copy to clipboard operation
vscode-change-case copied to clipboard

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

Open mindplay-dk opened this issue 7 years ago • 4 comments

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?

mindplay-dk avatar Mar 28 '17 10:03 mindplay-dk

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.

PhiLhoSoft avatar Nov 09 '18 10:11 PhiLhoSoft

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

niktor76 avatar Feb 19 '21 13:02 niktor76

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.

stealthrabbi avatar Mar 23 '22 17:03 stealthrabbi

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

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

elazarcoh avatar Apr 16 '24 08:04 elazarcoh