Friday Favorite: Snippets
Welcome to Friday Favorites! Every Friday, one of us will get all sloppy over an app, web service, or Mac feature that makes us grin like an idiot every time we use it. This week, Brett tells us about his favorite new snippet manager.
If you write code, you probably reuse blocks of it. Whether you're working in HTML, CSS, AppleScript, Objective-C ... it's all code, and a really well-written chunk of it deserves to be used again. You can put a few of your most commonly used snippets into TextExpander, sure, but the biggest problem is finding that function you know you wrote last year but haven't used since. This common little conundrum has given rise to some very elegant applications that aim to solve this and other related problems.
There have been a few great options lately for snippet organization. CodeCollector Pro has been my long-running favorite, with Snippet a close second. I like Snippet's sexiness, but miss having a nice, big, multi-pane window to organize with. CodeCollector Pro is a solid workhorse, but actions such as adding new snippets are a little more cumbersome than I'd like. I often just clip things into Evernote when I'm in a hurry ...
Then, along came Snippets (note the 's' that differentiates it from Snippet) to steal my heart. It's got Code Collector's utility, Evernote's searchability, and it's got an extra dash of sexy, ala Snippet. It has the standard sytax-highlighted code viewer, and a sidebar with groups and folders. Snippets are classified by language, which can be set in a dropdown or by just dragging a snippet to a language folder. It functions on a hybrid folder/tag concept, which happens to be the way I do just about everything. Each snippet can have a description, as well as labels (tags) and all full-text indexed for searching. You've also got groups, which are like folders, but a snippet can belong to multiple groups. It has smart folders which, as you know, function like automatic groups with boolean criteria. On top of all that, folders, smart folders and groups can all be gathered hierarchically in nested folders, with parent folders showing all of the contents of their child folders. Whew!
One of the things that hooked me right away was the way that Snippets handles importing of plain text files. You can just drag whole folders of code snippets (manually created or exported from another app) to the library and have them translated into snippets automatically. It does a pretty good job of determining languages and makes it easy to tab through and add descriptions and labels.
I had my whole snippet library up and running in Snippets in about 30 minutes, which is pretty good considering the number of inane lines of code I keep around. And it works both ways: drag a snippet from the library to your desktop and get a new file, named for the title of the snippet and with a language-specific extension. Drag, drop, copy, paste ... it's all quite intuitive.
There's a menubar item which can optionally keep running even when Snippets isn't. It has a search-as-you-type field, and a dropdown folder browser, and both can be triggered with custom hotkeys. Snippets selected in the menubar can be automatically pasted into the current application. It's not a unique feature (actually pretty standard), but it's a great implementation. There's also a url-handler, which responds system-wide to the snippet: protocol. It's ostensibly for providing links on a website that will automatically create library items in the reader's copy of Snippets, but it can be massaged into System Services and other bits of fun. Overall, I've found that Snippets really bridges the gap between Snippet and Code Collector Pro.
Snippets is in beta, and some bugs are to be expected (there's some funkiness with the menubar item after changing its preferences, for example). It's free for the duration of the early development, though, so it's worth a test run. I'm not sure what it will cost when it's fully-fledged, but I have a feeling I'll want to keep using it even after it has a price on it. If you are, or aspire to be, an efficient coder (or just a code packrat), give it a try and see what you think.
Share
Source: http://www.snippetsapp.com/
Categories
Welcome to Friday Favorites! Every Friday, one of us will get all sloppy over an app, web service, or Mac feature that makes us grin like...
Add a Comment
Code's not really my area of expertise, but I just wanted to comment that the icon is gorgeous. Someone had to say it... I'm going back to the kids' table, now. Have fun, guys.
January 08 2010 at 11:57 PM Report abuse Permalink rate up rate down ReplyI use Google notebook. It has a Firefox plugin that makes the notebok available form the browser status bar. It can expand within the current browser window or in a window by itself. Not only does it make the snippets organized (with descriptive titles) but they are available anywhere I have internet access. Which is good for for developers who contract and have to use different machines. You can also just navigate to the site. And you can share your "notebook" with select peers who have a Google account.
January 08 2010 at 4:51 PM Report abuse Permalink rate up rate down Replyforgot to say it is also searchable and tagable
January 08 2010 at 4:54 PM Report abuse Permalink rate up rate down ReplyI'm just wondering if this could somehow interact with TextExpander ... ?
January 08 2010 at 3:05 PM Report abuse Permalink rate up rate down ReplyOh just realized I was thinking about Snippet*s* not Snippet ugh
January 08 2010 at 4:53 PM Report abuse Permalink rate up rate down ReplySweet!! its been ages since tuaw posted about mac software that isnât twitter related!!!
January 08 2010 at 2:47 PM Report abuse Permalink rate up rate down ReplyNon-iPhone posts, maybe, but non-Twitter? Seems like there's been a few in the last yearâ¦
http://preview.tinyurl.com/yc7ugdn :)
I've been using Snippets for a few months now. It is, hands down, the best snippet manager for the Mac. Easy import and and export of existing code, and a nice labeling system to tag your snippets for later use. It syncs to Mobile Me, as both a backup, and so you have access to your snippets at work and home. But the killer feature is the system-wide menu that makes it dead-simple to paste in commonly used pieces of code, terminal commands, etc.
If you're a fan of the excellent "Things" for Mac, you'll recognize the same level of quality in in the Snippets interface.
Yeah, a tool that makes the GREAT practice of copying-and-pasting code easier. Just what we need.
January 08 2010 at 1:13 PM Report abuse Permalink rate up rate down ReplyHot Apps on TUAW
Deals of the Day
more deals- Used Apple iMac 17" Core 2 Duo 1.83GHz for $430 + $28 s&h
- Lounge Deluxe Stand for iPhone / iPod touch for $28 + $8 s&h
- Brookstone Surround-Sound Earbuds for $14 + $7 s&h
- Refurbished Skullcandy Tokidoki Smokin' Buds Mic'd Headset for $5 + $2 s&h
- Stitchway Backup Battery for iPod / iPhone for $5 + free shipping
- Used Apple MacBook Pro 2.4GHz 15" LED Laptop for $1,030 + $29 s&h
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



13 Comments