Managing a Code Library with Snippet

Various applications exist for helping programmers maintain a list of commonly used code samples – some are stand alone, others integrated into popular software such as Coda. Today I will be exploring Snippet – a great looking Mac application that allows you to store notes and snippets of code and search through them quickly.

Snippet covers all the basics, coupled with a range of advanced functionality: searching, syncing, and a remarkably pleasant user interface. This review will walk you through how to add and search snippets, explain the drawbacks, and offer a few more details about our forthcoming competition to win a copy.

Storing Snippets

The ability to quickly and easily add a new piece of code is vital, and Snippet certainly delivers. Hitting a shortcut key (Ctrl+S by default) will bring up the interface for adding a new code fragment:

Entering a new Snippet

Entering a new Snippet

From here you can select the programming language in question, and copy-and-paste the code to be stored (or drag-and-drop a file). Code highlighting is used to great effect, and looks good against the black background.

You can also enter text directly, though I noticed a problem whereby the up and down keyboard arrows do not work for moving between lines – a niggle that becomes fairly annoying after a while. Hopefully this will be fixed in a future version.

Tagging is fully supported throughout Snippet, with adding tags simply a case of typing a comma separated list after the snippet content. Quick and effective:

Tagging

Tagging

To quickly create a snippet containing a selected block of code, use the keyboard command “Command-Shift-6″. This will automatically copy the selected text into a new snippet, ready to be stored.

Searching Snippets

After a decent library of snippets has been built up, you need to be able to rely on a solid search engine for finding all the information stored. Snippet seems to work well in this area with accurate search results being produced very quickly. Both tags and the body of the code are searched.

Searching for Snippets

Searching for Snippets

Snippet can work without requiring the mouse at all. Ctrl+S will bring up the search field, you can search with the keyboard, then hit Command+[result number] to copy that particular snippet to your clipboard. Focus is then automatically returned to the previously application.

Preferences and Syncing

A few preferences exist for customizing how the application works. You can specify whether Snippet should launch at login, and adjust the shortcut key for quickly switching to the utility. If you would prefer that Snippet automatically pastes code into the active window (rather than simply copying it) this can be specified here.

Preferences

Preferences

Another notable feature is the ability to synchronize Snippet with MobileMe to maintain the same code library on several different computers. This can be a real time-saver and it’s great to see MobileMe being put to full use by developers.

Other Solutions

A few other applications exist for managing a collection of code samples. Here are a few to consider:

  • CodeCollectorPro – A fairly powerful application, also with keyboard shortcuts to keep the process mouse-free. Slightly more expensive, at just under $30.
  • Snippely – A free Adobe Air application. You can’t argue with the price, but the interface is very simple and code highlighting isn’t quite as well executed.
  • Schnippselchen Pro – An incredibly unusual name, but the app is completely free and worth taking a look at. Seems very easy to use.

Conclusion

Snippet is an incredibly handy tool for anyone who needs to use the same piece of code or text on a regular basis. It costs $12.95 – fairly reasonable when you consider the time it could save.

If Snippet appeals to you, be sure to check back next week when we’ll be running a competition to win one of ten licenses!


  • http://cgdigg.com Chen

    Already bought it via macupdate, very nice.

  • http://stephenkorecky.com Stephen Korecky

    I’m happy to share with everyone that the “…a problem whereby the up and down keyboard arrows do not work for moving between lines…” Has been fixed in our latest release 1.2

    If anyone has any questions, I’d be happy to answer them here!

    • http://davidappleyard.net David Appleyard

      Awesome – Nice one Stephen :-)

    • http://www.brandonmblack.com Brandon

      I would love to be able to specify cursor position or date/time information as well (similar to TextExpander). Otherwise, awesome product!! Looking forward to seeing build out the API on snipt.com.

  • http://www.idistillery.com Jason

    I hope you get some sort of affiliate credit or something, because Snippet is about the 5th app in the last two months that I’ve bought purely on the recommendation of this blog! Still very happy with each of them… keep up the good work!

  • http://themeforest.net/page/top_sellers?ref=mbkool MIke

    Any good sites to collect snippets?

    • http://stephenkorecky.com Stephen Korecky

      I’ve been liking http://snipt.net We’re just waiting for them to publish an API that Snippet can work with :D

      • http://themeforest.net/page/top_sellers?ref=mbkool MIke

        Nice, an API would be great.

  • http://www.mattpolito.info Matt Polito

    Also make note that it’s easy to sync using dropbox as well. It even will let you know in preferences that another sync method is being used so you don’t activate the mobile me option.

    • http://www.bluewavemedia.ca Kimberly Beaven

      Hey Matt

      How do you get it to sync to dropbox — sounds like a great idea

  • http://www.kimkorte.de Kim Korte

    Very nice looking and usefull app but I think it’s slowing down Spaces..

    When Snippet is running and I switch between my 4 Spaces (2 displays) I notice a drastic performance difference. Maybe this can be fixed in future :>

    • http://snippetapp.com Stephen Korecky

      We’ll look into this! Thanks for letting us know.

  • http://www.zettt.de Zettt

    Hi thanks for this review of Snippet! I was thinking for a very long time if i should buy it or not.
    I’m from Germany. Michael the Coder of Schnippselchen is too.
    The term “Schnippsel” is german for “Snippet’. (A small part of a text, maybe cut out from a longer one)
    “chen” means is added at the end when we want to make something “cute” or “small”. So a “Katze” (cat) is “Kätzchen”, which means it’s a small cat.

  • http://www.davidturnbull.com David Turnbull

    This is absolutely brilliant. I use TextMate for all my coding, which has in built snippet-functionality, but this app seems to handle it far more intuitively. Think this’ll be another purchase I make.

  • Perry Fjellman

    This looks like a great app, and I was all ready to buy before I even tried, but there are several big problems.

    1. When trying to email support, their email link does not work. I can’t find any way to email them.
    2. I’ve added snippets, set everything up, but when I try to insert a snippet, I see the added graphic come on the display and then fade away, but nothing gets inserted. Ever. It’s driving me kind of mad….

    Maybe I’m doing something wrong? It’d be great if I could email the developers.

    • http://www.davidturnbull.com David Turnbull

      By default the code is only added to your clipboard.

      To fix this go to the Preferences, and then the General tab. Check the box next to the 4th option that says “Paste snippets instead of copying them”.

      :-)

      • http://snippetapp.com Stephen Korecky

        Thanks David! You replied before I could!

  • Perry Fjellman

    The command+shift+6 thing isn’t working either. =(

    • http://snippetapp.com Stephen Korecky

      Hey Perry,

      Which Email link isn’t working?

      That ‘added graphic’ is saying that the snippet of code was Copied to your clipboard. If you’d like it to paste instead, you can change that in the general preferences.

      The command+shift+6 requires a restart after you first install Snippet (it’s a system thing)

      If you have any more questions, please email us at support at fuelcollective.com

      or checkout our help section http://fuelcollective.com/help

  • http://onetruebrace.com Anh

    Love the way Snippet use a menu bar icon to do all the hard work instead of having a full blown window. I think it would fit perfectly in my workflow.

  • http://www.idistillery.com Jason

    I’ve been using it for just a few hours now and I love it! Lots of little UI considerations that make it fit seamlessly into my coding process:
    + Automatically returns to the previously-active window when leaving Snippet window
    + Sync library across multiple machines with DropBox
    + Sits in upper toolbar instead of taking up precious dock real estate
    + Easy-to-customize shortcut keys
    + Intuitive layout of controls

    Highly recommended… a no-brainer at $13.

  • Perry Fjellman

    I’d like the software to just insert the code at the cursor point rather than deal with the clipboard. I almost always have code in my clipboard or something else in my clipboard that I need access to.

    I used the paste rather than copy preference but if I manually change something on the clipboard, it seems perpetually confused. I try to add another code snippet and it just re-pastes what’s already on my clipboard, rather than the snippet I’m trying to get.

    I could only find one email link on your entire website, the one on the help page at the very bottom. But, when you click it, it simply returns you to the top of the page using a #top link, rather than linking to a sendmail. Not sure what’s up with that.

    • http://snippetapp.com Stephen Korecky

      Hey Perry,

      In order to transfer snippets from Snippet to an app, we must us the clipboard. Otherwise we would have to use some weird hacks that we just aren’t interested in since these can sometimes harm someone’s computer.

      It shouldn’t re-paste what’s already in your clipboard. I’ll file a bug report so we can look into that issue.

      As for the email, do you have JavaScript turned off? We use JS to help protect us from spam, but we will be adding a contact form soon to the Snippet website.

      I hope I answered your questions alright, please email us at support at fuelcollective.com if you have any more questions!

  • gemmes

    I bought this and had trouble knowing when I had added a Snippet as there is no Snippet Manager feature as you have to search for a snippet then edit it. Also after pasting a snippet I had to press X to add to the library, I thought this was cancelling snippets. Tagging was strange too as I could not seperate tags with spaces I had to click off screen then on again for multiple tags.

    I was disappointed with this app after I bought it. This app is a nice idea but I will be keeping an eye on its updates before I begin to use it again.

    • http://www.idistillery.com Jason

      Tags are comma-separated… the instruction is in the tag field whenever you add a new snippet.

      Clicking almost anywhere after pasting the snippet will add it to the library, but it would be nice to have a dedicated button on the window, just to give a bit of confirmation to the user. It’s the same problem I first had with “System Preferences” in OS X, but it just took some faith in the OS that your settings were going to be saved without having to press a button to that effect.

      But then I suppose if there were a dedicated “ADD” button, users would panic when they clicked elsewhere and the window flipped (even if the info was safely stored)… so it’s a horse a piece, really.

      • gemmes

        Thanks.

        I had another look at this app and figured out to use commas.

        Q. Is there any wildcard key to show ALL my current snippets?

      • http://snippetapp.com Stephen Korecky

        gemmes,

        At this time there isn’t a way to show all snippets. Since if a user had 100 or more snippets (or even less) this could cause the system or Snippet to hang. It’s also not user friendly to show all these snippets at once.

        We are however working on a way to easily manage your snippets.

  • http://www.nouveller.com/ Benjamin Reid

    I use Coda which has ‘Clips’, is this the equivalent of this app? Besides the search function.

    • http://snippetapp.com Stephen Korecky

      Benjamin Reid,

      It’s actually a bit different. But if Coda is your main development tool and you’re happy with Coda’s ‘clips’ tool, then Snippet may not be for you. But if it seems interesting to you, please feel free to download it and try it out!

  • http://flickr.com/fiz FiZ

    I have to say that I’m loving Snippet so far, but I have to agree that it would be nice to have some kind of “Snippet Manager” while keeping the program unobtrusive. And while I’m sure this is all-too-obvious by now, I think it’d be preferable to enhance the syncing options in Preferences for generic web-storage systems: Dropbox, Box.net, etc. Maybe even Evernote syncing could be a consideration

    • http://snippetapp.com Stephen Korecky

      Hey FIZ,

      We’re working on creating a Snippet Manager, but this will take some time to make sure we have something that works well.

      While we don’t have a preference for DropBox and other syncing solutions, have you taken a look at our help section? http://fuelcollective.com/help/ We have instructions to help users setup dropbox for syncing.

  • http://twitter.com/sulcalibur Sulcalibur

    I bought Snippet when it was on the Maczot sale. I love it I was using Schnippthingy before and for anyone looking for a free alternative, that’s the one.

    Features I’d love to see is some form of syncing via subversion or online on an ftp so users who work with each other can build up a huge selection of commonly used code for themselves.

    Also something to quickly add the snippets would be great too similar to the coda-clips site. If it could grab their data too that would be awesome.

    All in all a superb app, great price and great developers!

  • http://twitter.com/sulcalibur Sulcalibur

    Ahh I just noticed a BIG flaw. All of these snippets but no notes for them. I know you can add tags but in an example where it’s say WordPress code, php or jquery it might be a good idea to add a descripsion of what it does.

    • http://snippetapp.com Stephen Korecky

      Hey Sulcalibur,

      Thanks for the feedback! We’re trying really hard to keep Snippet streamlined, easy, something that works for a large group of users. So things like notes might not be for everyone, however might we suggest adding notes to the code instead?

      If you would like to discuss it further, send us an email at support at fuelcollective.com

    • Jonathan

      +1 for a description. Oftentimes the first couple of lines of my snippet don’t really tell me what the snippet does. If I could add a title that would be perfect.

    • LeMerlot

      +1 for a description – I would second this too!

  • Perry

    I have javascript enabled and I just checked… your email link does not work. I’m surprised if you’re receiving any messages at all. It just re-links back to the top of your support page. And the paste rather than copy feature is totally mucked up. I really like this software but it’s just not quite *there* yet.

    • http://snippetapp.com Stephen Korecky

      Hey Perry,

      It seems there was a bug in our JS that effected some browsers (still unacceptable) but thank you for letting us know. It should work now. We’re also going to work on making it a bit more noticeable.

      We will of corse continue to make Snippet more bug free and even better.

  • Perry Fjellman

    Thanks Stephen, your responsiveness alone makes the software worth checking out. I’ll keep an eye on the updates. Good luck! (=

  • http://www.rossgardt.de Benedikt R.

    Nice App. Thank you for reviewing.

  • Simon

    Bit of a steal for $12. Instant purchase.
    Loving this blog.

  • Pingback: Win a Copy of Snippet – Mac.AppStorm

  • Pingback: Win a Copy of Snippet | Oh Wow ... a Blog

  • http://www.neostate.net Niklas

    I really like this app, and I´m considering to buy it. However, I cant seem to make cmd-shift-6 work, witch is a bit annoying. I´ve restarted the machine a couple of times, but still no luck. I may try to assign another keystroke combo in case that particular one is occupied by something else, but it doesn´t feel like that is the problem…

  • Pingback: Design City » Win a Copy of Snippet

  • http://www.craigslisttoronto.net Craigslist Toronto

    this software is good , and used it for last 3 month, comments here are valuable

  • Pingback: Highly Recommended Services and Apps: CodeCanyon Sponsors | Programming Blog

  • Pingback: Highly Recommended Services and Apps: CodeCanyon Sponsors | Arthur Chu | Web Develepment Aggregator

  • Kapslok

    I own snippet and find it really, really useful – especially for the stuff I don’t do very frequently like Linux bash commands, and MySQL snippets.

    Your example snippet however gave me a chuckle – you might want to add a semi-colon to the end of the ‘&copy’. I’m surprised no other programmers bothered to report this.

  • http://www.martinvaresio.com.ar Orfebre

    I´ve restarted the machine a couple of times, but still no luck. I may try to assign another keystrok!!!

  • Stephen Downs

    Schnippselchen Pro doesn’t seem to be available any more – broken link from here and from Apple

  • Pingback: A Web Designer?s Guide to Coding Apps | Camixo

  • Pingback: A Web Designer?s Guide to Coding Apps | Geboo

  • Pingback: A Web Designer?s Guide to Coding Apps | Zoomfly

  • Pingback: A Web Designer?s Guide to Coding Apps | Bubbleworks

  • Pingback: A Web Designer’s Guide to Coding Apps | All of Cyber

  • http://www.lvaustraliaoutlet.com louis vuitton wallet

    This actually answered my problem, thank you!

  • http://halogenchandelier best chandelier

    Hiya! Fantastic weblog! I happen to be a day-to-day visitor to your internet site (somewhat far more like addict ) of this internet site. Just wanted to say I appreciate your blogs and am seeking forward for a lot more!

theatre-aglow
theatre-aglow
theatre-aglow
theatre-aglow