I'm using the Jetbrain WebStorm IDE, but I love Sublime Text, so if I got a renaming plugin for Sublime, I will drop my WebStorm, its so heavy for me.
The simplest way: put cursor on name, alt+f3 (select all), then type your new variable name.
You must press ctrl+D again to get additional selections in the file. For mac user: i prefer to use command+D. Press the buttons together multiple times to select the items to refactor.
Select Edit > Refactor > Rename. Right-click the code and select Rename.
Sublime 2 has built-in functionality.
First select the word you need rename (I used word instead of variable or function because it is applicable to ANY text file).
Click Ctrl+D, multiple times. Each time you click Ctrl+D, it is going to select the next Occurence (most people miss the 'multiple' click part).
Finally you can rename all highlighted occurences at one go.
There might be a better plugin out there, but this works right out of box.
One of the best place to find plugins in on Will Bond's Community Sublime Packages site.
There is a plugin for python refactoring and one for javascript, but no general-purpose one (yet).
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