This post is for the Mac coders, and won’t be of much interest to those not using Xcode for development. If you are, however, and haven’t explored some of the available plugins, this might be enlightening. Or frustrating if you already know all of this, but you can’t please everyone.
The Xcode IDE has some pretty awesome tools for navigation, refactoring, alignment and more. There are some great plugins for extending and improving that functionality, though, no matter kind of development you use Xcode for. These are a few of my current favorites for Xcode 5+.
Managin plugins with Alcatraz
First, do yourself a favor and install Alcatraz. It’s a package manager that gives you one-click access to themes, plugins and templates. You just bring up “Package Manager” from the Window menu in Xcode (or ⌘⇧9), browse available items and click the icon to the left of them to install. On the right you can click the arrow to go to the homepage for the theme, plugin or template and read more about it. All of the packages listed below are available through Alcatraz.
Navigation and selection
- Quick navigation between methods in Objective-C code with Control-]/[.
- I’ve become overly accustomed to Sublime Text’s ability to make Command-← jump to the first character of the line, rather than all the way to the left margin. This does exactly that, and repeating the keystroke will provide the default behavior.
- Provides Paste Lines (with or without reindent), Regex Match Highlighting, Copy Method Declarations, Method Definition and Signature Selection and Symbol Highlighting. My favorite right now is “Copy Method Declarations,” which lets you select methods in your
.mfile and paste their declarations into your header file automatically.
- Format and indent code using clang-format. Operates on a selection or the entire current file.
- Another great plugin for tidying up your code. Select text and have it align equal signs, property or definition groups.
- Adds “fuzzy” string matching to Xcodes autocomplete, meaning your misspellings or short versions will still bring up method and string completions.
- Autocomplete for ImageNamed based on the assets in your project.
- Automatically hide the debug console whenever you start typing in the editor.
- Dash is my #1 favorite development tool, and being able to use it to quickly access Apple Developer docsets on Option-click is a vast improvement over the built-in help in Organizer. This plugin overrides the default help system and uses Dash instead.
- This one is cool. You start a string literal and it gives you a popup you can click (or assign a shortcut key to) and open a box. Type your text into the box, ignoring the usual escaping required, and it will replace your
@""string with the text from the box, fully escaped (including newlines).
- A handy tool for gathering and listing all your
???comments in your code. Also see Pattern Digger.
Got any more you think everyone should know about? Add them in the comments, I’d love to see them!