I want to rename a variable used across an angular template file (i.e. an xxx.component.html file). This could be done with Shift + F6 shortcut in WebStorm. How to do it in vscode? F2 doesn't help.
I want to rename a variable used across an angular template file (i.e. an xxx.component.html file). This could be done with Shift + F6 shortcut in WebStorm.
Source code refactoring can improve the quality and maintainability of your project by restructuring your code while not modifying the runtime behavior. Visual Studio Code supports refactoring operations (refactorings) such as Extract Method and Extract Variable to improve your code base from within your editor.
This refactoring tool will accurately perform the renaming action. Highlight or place the text cursor inside the item to be renamed: Next, use your keyboard or mouse as follows: Press Ctrl+R, then Ctrl+R. (Note that your keyboard shortcut may be different based on which profile you've selected.) Select Edit > Refactor > Rename.
Renaming is a common operation related to refactoring source code and VS Code has a separate Rename Symbol command (F2). Some languages support rename symbol across files. Press F2 and then type the new desired name and press Enter.
You need to use Ctrl + F2 combination to select the word and then type the new word , It will select all and replace with the new one
Ctrl + F2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With