Multi variable rename

This feature would be pretty much similar to visual studio variable renaming as you can see in this gif 43e077c2925cf12e6771deea900c60c8.gif

It would be a really nice feature for programmers on Roblox since keeping your code organized is really important and sometimes you just realize that the variable you made doesn’t make any sense or it would make more sense to use that variable somewhere else and rename the old one. Soo to speed up the process and avoid sometimes even using variable names which don’t fit just because otherwise, you would have to rename all the old ones, I think this feature would help a lot.

62 Likes

I could definitely see why this would be better than replace all.

+1

11 Likes

That would be a really handy feature

This would be useful

Having user friendly features like this is so great for newbie devs. Totally support!

3 Likes

Yay, one more use for the script analyzer framework! :smiley: @twberg

19 Likes

For anyone for that matter. I’ve been a programmer for several years and I still make regrettable variable choices :sweat_smile:

I’ve had the variable for the players ship set to “p” in my game since the beginning. Support!

Also, would this change the variable depending on if it is local to a function, loop, ect? If I have a variable named p for the ship and I set another local variable named p in a for loop and tried renaming one of them, would this keep that in consideration and only change the name of the p I want it to?

Scoping should always be considered. Suggestion for how that would work is only refactoring the variable between the scope you’re working in. So if you right click a “p” which is local for your function/loop/etc then it will only change the variable where it applies.

2 Likes

Is this script analyzer framework your talking about something new to come or already in use behind the scenes code?

25a28e0a26595fab0e50ee52f345da2f.png

renaming with the current detection wouldn’t be the best :sad:

2 Likes

indices[currentIndexIndex] = index; //this line inserts the index of a mesh vertex into an index buffer

i regret nothing

:disappointed_relieved:

I am always using the variable rename feature in IntelliJ.

1 Like

It’s already there and it’s used for script analysis widget (+ error/warning highlighting) as well as Intellisense for local variables. I don’t think we currently use it for highlighting the selected word - that is purely text based ATM (but there’s no reason why we can’t use it for highlighting the same variable either)

1 Like

I would find this feature very useful right now. I’ve been manually finding and replacing several variable names very frequently lately, and it’s become a pain not to have this feature that comes standard with every other IDE I’ve used. Support!

1 Like