As on right click of variable in Android Studio, for renaming all specific variable in a file, there is shortcut for
Shift + F6
On Mac function buttons works by default. So you should click Fn + Shift + F6, or go to System Preferences -> Keyboard and change behaviour of F buttons.
Fn + Shift + F6