How edit multiple lines on Xcode (shortcut)

Damien Romito picture Damien Romito · Mar 31, 2015 · Viewed 16.3k times · Source

I'm sorry, I don't find an already asked question for this problem...

in Xcode, what is the shortcut to edit multiples lines like the "CMD+click" of sublime text?

enter image description here

Answer

Daniel picture Daniel · Sep 18, 2018

It is possible with Xcode 10+, see the wwdc2018 presentation of the functionality.

Ways to create multiple cursors:

  • shift + control + left mouse click: Will create a new cursor on every click
  • shift + control + : Will create a new cursor above
  • shift + control + : Will create a new cursor bellow
  • option + drag: Will create a new cursor on every line you drag

preview:

enter image description here

For more information, see this answer