In Sublime Text, it's easy to select the next instance of a word by pressing command + d and also place multiple cursors by pressing command & clicking. I know I'm not alone in saying this is an incredibly useful function in editors.
I haven't had any luck in finding any key mappings or Alcatraz plugins for this, so I was interested to see if either there is a way to do this in xcode 5 which I might have missed or if there are plans to implement this in xcode 6?
If there isn't, and any xcode developers see this, would love to see this as a feature and hear your opinions on it :)
Use multiple cursors to make changes to your code faster. Multi-cursor selection in WebStorm: Select next occurrence of the current word or selection: Ctrl+G on macOS and Alt+J on Windows and Linux. Select all occurrences: Ctrl+Cmd+G / Shift+Ctrl+Alt+J.
Hold down the Shift and Control keys, and press the Right-Arrow key. Now both instances of top are selected!
It is possible starting from Xcode 10 Beta 3
You can add selections for the next and previous find results using the “Find and Select Next” and “Find and Select Previous” menu commands.
Additionally, you can quickly add selections for the next and previous occurrences of the current selected text using the “Select Next Occurrence” and “Select Previous Occurrence” menu commands.
⌥⌘E to select next occurence of currently selected
⌥⇧⌘E to select previous occurence of currently selected
⌥⌘G to find and select next
⌥⇧⌘G to find and select previous
You can also use the Find
menu to find these actions. Of course, feel free to bind it to different hotkeys!
If what you're wanting to do is change the name of a variable, then when your cursor is on the variable press control+command+E and type away. (This is "Edit All in scope")
For editing on a Project scope there is always the Editor > Refactor > Rename
menu item
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With