Bookmarking Xcode Project Search Results
Some friends at work have shown me a hard-to-find feature in Xcode that offers a speedy, convenient way to run project-wide searches that you find yourself repeating frequently: bookmarking search results. Rather than having to retype a search query again and again, you can bookmark them for later use.
Here’s how to do it:
-
Go to the “Find” tab of the Navigator pane (this is the “Navigator > Find” menu option, which is keymapped to
CMD+4
by default). -
Enter your search query.
-
While keeping your text input cursor in the query box (that part is important), go to the Edit menu and you’ll see an option to bookmark your search query:
This menu item only appears under the Edit menu.
This action creates a bookmark of all currently-matching search results:
The bookmarked search results.
The bookmark can be refreshed with the click of a button at any time. Just mouse-over the bookmark and click the refresh control that appears (see the image above).
To give you a better real-world example of how I use this feature, one of the searches I perform most frequently is for <<<<<<<
git merge conflict indicators:
Anything to reduce friction in an already friction-prone part of my work day is welcome.
One last thing: you can edit the description of the bookmark to make it easier to read. I like to edit the description of my merge conflict search from <<<<<<<
to read Merge Conflicts
instead. Just right click on the bookmark description and select “Edit description” from the contextual menu:
How to edit the bookmark description.
Enjoy!