[IDE tool] Variable renaming

Just starting out? Need help? Post your questions and find answers here.
AZJIO
Addict
Addict
Posts: 2154
Joined: Sun May 14, 2017 1:48 am

[IDE tool] Variable renaming

Post by AZJIO »

Variable renaming

Download yandex

Image

Sometimes variables are created on the fly without much thought. As development progresses, some variables have ambiguous names. For example it would be desirable to make a prefix global variables. For example, the "i" and "j" counters should be changed to "x" and "y", since this is related to the coordinates.
Last edited by AZJIO on Wed Apr 19, 2023 9:00 pm, edited 2 times in total.
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Variable renaming tool (?)

Post by Kukulkan »

I don't know the answer to your specific question but the feature you're asking for is refactoring. Maybe you can find some info for that search term? IDE's like Visual Studio (Code), IntelliJ IDEA and many others offer refactoring for several languages like golang, JavaScript or PHP out of the box. But it is a complex thing as variable scope (functions, classes, loops, modules etc) must be followed and respected, too. Otherwise, by a simple search/replace, you may destroy code.
AZJIO
Addict
Addict
Posts: 2154
Joined: Sun May 14, 2017 1:48 am

Re: Variable renaming tool (?)

Post by AZJIO »

Done.
Video of how it works
Post Reply