The functionality I'm talking about is in VI/VIM. ie. When the cursor is over the text of a word like say jiggle in command mode, press * to search for the next instance of jiggle. I use this all the time in VIM. Does such a shortcut exist for Xcode? or can we only double-click to highlight, CMD + C, CMD + F, CMD + V, and hit Enter?
Find text or patterns in your source code To find text in a file, open the file in the Xcode source editor and choose Find > Find from the menu bar. Xcode displays the Find bar and its search controls at the top of the file. Enter a search term.
By hitting the keyboard shortcut Shift-Command-G on the desired clip, you can make personal notes about the footage. This organizational tool can be extremely effective when sharing your work with other editors and can be helpful if your work needs approval before being published online.
Press Ctrl+F, and then type your search words.
Hold down the Shift and Control keys, and press the Right-Arrow key.
Ok, Phrogz has a good solution, but I found a simpler way to do this...
To search consecutive instances of a word in Xcode:
Double-click the word you would like to find the next instance(s) of, then as Phrogz mentioned press ⌘ + E (Use Selection for Find) and then ⌘ + G (Find Next) to search for the next occurrence(s)
Cmd + Ctrl + T will invoke the menu item "Edit All in Scope". That will highlight all uses of the current identifier and allow you to edit all simultaneously.
Not exactly the same thing, but I find it very useful for the sort of case you're talking about. Even if I don't need to edit an identifier, it's a nice way to quickly see all the places its used.
If you select the word (⌥←,⌥⇧→) you can press ⌘ + E (Use Selection for Find) and then ⌘ + G (Find Next) to search for the next occurrence.
You can combine the command+e, command+g to a shortcut
Find a file IDETextKeyBindingSet.plist
in directory "/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/"
Open this file by Xcode
Add a Dictionary named Customized
under the Root
Add a String named Move to Next Instance
under the Customized
and set the value to selectWord:, useSelectionForFind:, findNext:
IDETextKeyBindingSet.plist
Restart Xcode and set the Key Bindings
Find Move to Next Instance
and set the key to option+↓
(or other key you prefered)
Key Bindings
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