What’s the shortcut for “Edit All in Scope” in Xcode?
XcodeXcode Problem Overview
In Xcode, there's a feature to edit variables or codes within a scope:
In my IDE, this feature only works when I move my mouse over a variable. Most of the time, I don’t get this feature. Since it’s fairly useful, I’d like to use it more often.
Is there a keyboard shortcut for this? (Please don’t tell me to use “Find and replace”.)
Xcode Solutions
Solution 1 - Xcode
Menu: Editor -> Edit All In Scope (also shows key binding)
Keyboard Shortcut: Control-Command-E
If you want you can change this key binding on Preferences -> Key Bindings -> search for "Edit all in scope".
EDIT: In Xcode 9, you may want to instead use the fabulous new "Rename…" functionality, which works across classes, also renames files and comments, and gives you a neat preview. As of beta 2, this does not have a default keyboard shortcut, but you can easily give it one.
Solution 2 - Xcode
Press Cmd-Ctrl-E
to edit all in scope
Solution 3 - Xcode
For xCode 9 there is not default hotkey for Refactor > Rename
But you can setup it:
for instance, Ctrl + Shift + R