We touched briefly on this topic back in Bite #273 with Generating Initializers. Today we'll take a look at a few additional Xcode Source Editor Extensions (Bite #239) that can help us save time while working. Let's begin.
First up, Equatables. We can use XcodeEquatableGenerator from Serg Dort to quickly generate the long list of property comparisons often required when adopting the
Equatable protocol in our Swift Structs or Classes:
Whew! That used to take ages! Full installation instructions are here.
With it, we can select a line of code like this:
let _ = "Mission Control Panel"
Then, when we run Localizer's command, this line becomes:
let _ = NSLocalizedString("Mission Control Panel", comment: "Mission Control Panel")
Last but definitely not least, is XcodeWay by Khoa Pham. This one is a bit different in that it doesn't modify or generate any code, but rather lets us quickly open a bunch of commonly used directories, by adding them to our Editor Menu:
Nice! No more hunting around in Finder or Terminal for these.
Know of another neat Source Editor Extension? Send it along!