VSCode - Another Method

I’d just like to note that in VS Code specifically (probably visual studio as well) you can right click on a function or variable and choose “Rename Symbol,” which will allow you to type a new name, and will update it wherever it is referenced in code. Which won’t include comments or other files such as archives, only where that specific symbol is referenced in code.

3 Likes

Also, I think it would be nice to mention in course other methods that are possible in different IDE if they exists. For example, I’m using full Visual Studio 2019. And as @wstutzman mention, we can choose “Rename option” or use keyboard shortcut: select function name in code, press and hold “Ctrl”, and double tap “R” - it will bring window for renaming with many options to select.

Przechwytywanie

I think that showing different IDE-specific tips&tricks would be helpful to many people, who use different IDE for coding. So please @Michael_Bridges, share that knowledge with us as well :slight_smile:

2 Likes

Rider for UnrealEngine

  1. Select the keyword (function, variable, etc.).
  2. Right click on it and from the menu, select Refactor -> Rename...
  3. Type in the new name, optionally you can also rename inside comments and string literals by checking the Search in comments and string literals option.
  4. Click Next.
    All instances of that function / variable will be replaced properly. You are less likely to mess up the code by doing this compared to the find and replace operation since Rider is looking at the actual declaration / usage instead of a basic “textual” replacement.
    Better yet, make sure to use the keyboard shortcuts as it will save you a lot of time. I’m using the C# scheme so for me Rename is F2, it could be Shift+F6 for you if you are using the default setup.

2 Likes

Privacy & Terms