Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What’s the shortcut for “Edit All in Scope” in Xcode?

Tags:

xcode

In Xcode, there's a feature to edit variables or codes within a scope:

Scope editing

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”.)

like image 219
Midhun MP Avatar asked Jun 14 '13 18:06

Midhun MP


People also ask

How do I move lines of code in Xcode?

command + option + [ or ] to move a line of code up and down.


2 Answers

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.

like image 87
fzwo Avatar answered Oct 03 '22 18:10

fzwo


Press Cmd-Ctrl-E to edit all in scope

like image 28
John Henckel Avatar answered Oct 03 '22 19:10

John Henckel