How edit multiple lines on Xcode (shortcut)

I'm not sure how helpful this is to you, but if you want to change a variable name, you can click it, hover over it until the triangle dropdown button appears, click it and select Edit All in Scope.

This allows you to change all instances of that variable name.

enter image description here


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