Changing Variable Names Simultaneously

Perhaps I missed it early on, but every time we have a line of code such as:

for (int32 i = 0; i < count; i++)

The instructor simply changes each “i” simultaneously with some keyboard shortcut, so that at the same time, it becomes:

for (int32 Index = 0; Index < count; Index++)

How can I change the i to Index all at the same time as the instructor is doing? He might’ve mentioned it once early on in the lessons but I’ve been patiently waiting for him to say again how he’s doing it, and he never does.

You have a couple options

Alt + Left Click - adds a cursor where you click
Ctrl + D - adds the next matching word to what’s selected
Ctrl + Shift + L - selects all matching words in the file

and probably the one you ought to be using

F2 which is rename symbol and will give you a preview of what will be changed as well as a UI to check/uncheck matches.

Looks like Ctrl + D is what I was looking for, and is what he’s using in the videos. Thank you!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms