Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does "Rename Symbol" work across files when editing JavaScript?

Does the "Rename Symbol" feature work across files, when editing JavaScript? Currently it's only working within the current file being edited. I seem to recall it working across files, though. It would open all the files that it had made changes to. It's no longer doing that, though.

Am I remembering incorrectly or does it work this way?

like image 704
Ryan Avatar asked Jul 31 '26 15:07

Ryan


1 Answers

The feature Rename Symbol only works for the current file. But there is another feature, which fits your description: Replace in Files (Menu Bar: Edit > Replace in Files).

From Visual Studio Code User Guide:

You can also Search and Replace across files. Expand the Search widget to display the Replace text box.

When you type text into the Replace text box, you will see a diff display of the pending changes. You can replace across all files from the Replace text box, replace all in one file or replace a single change.

For a quick use you can select a word in your source and hit Ctrl+Shift+H.

like image 116
ge0tram Avatar answered Aug 06 '26 10:08

ge0tram



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!