Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Sublimes CMD + D equivalent in Xcode?

Tags:

xcode

Ive been writing swift for months without this answer, and can't find it online. CMD + D is too useful a command in sublime to not have an Xcode equivalent. Can anyone please tell me what it is.

like image 821
n00bie42 Avatar asked Jan 31 '17 20:01

n00bie42


People also ask

How to Jump to a Line in Xcode?

Jump to Line ( ⌘ + L )

How do I select a line in Xcode?

Shift + Control + Click First, hold Shift and Control (^) and then click where you want to select multiple lines and then start typing. One small caveat: unlike other text editors where you can click that same line to unselect the multi-line selection, Xcode doesn't support that yet.


1 Answers

From at least Xcode 12.4 and above, this functionality is available as "Select Next Occurrence" in the "Find" menu, and as Option + CMD + E.

Select some text. Hit Option + CMD + E to add the next occurrence, resulting in multiple cursors so you can edit all of them at once.

like image 171
Jens Avatar answered Nov 10 '22 05:11

Jens