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?
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?
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:
For more information, see this answer
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.
control
cmd
+ E
). –
Busiek Multiline editing is supported in Xcode 10, Ctrl + Shift + click the lines you want to edit.
I had this same question a few weeks ago, if you use the Option Key you can use column select and edit multiple lines like in your picture. Where the confusion comes in is it is used for multiple things. If you click the option key over a variable or text it shows a question mark and shows information about what you click on. However, if you hold the option key while before the line or not over text it shows up as a plus symbol and you can drag and select multiple lines and edit them at the same time.
© 2022 - 2024 — McMap. All rights reserved.