Pin Me

Top Coding Tool for Mac Users: Snippet!

written by: •edited by: Michael Dougherty•updated: 5/23/2011

Snippet is a great way to manage and index your favourite pieces of code that you might regularly return to. Easy to use and free to download, no Mac-based developer should be without it!

  • slide 1 of 5

    Manage Code with Snippet

    Managing Code with Snippet for Mac OS X When developing websites, scripts and programs, many developers start with a pre-defined framework. For instance a web developer might kick things off using a basic XHTML web page with the relevant document type definition already defined, or someone developing a JavaScript-based routine might have a few functions already included. These are usually based on a template approach, with a raw basic copy of the script left untouched.

    None of this is necessary using Snippet, which enables you to easily organize and store any key snippets of code (hence the name) and retrieve them and add them to new projects whenever required.

    Ideal for many types of use, but mainly those that involve some sort of development, Snippet is very easy to use and makes the task of revisiting and re-utilizing old scripts almost effortless.

    (Screenshot by author)

  • slide 2 of 5

    Download Your Copy of Snippet

    Designed for use with Mac OS X 10.5.1 or later machines, Snippet is currently on versions 1.6.1 and can be downloaded from www.apple.com/downloads.

    Note that this initial download is only a demo version of the software, with various restrictions put in place; the full version of the software will set you back $12.99.

    Once downloaded, the software should mount, so when prompted drag the Snippet icon over the Applications folder icon to install. Snippet can then be launched from the Applications folder, ready and waiting to start work!

  • slide 3 of 5

    Overview of Snippet on Mac OS

    Using Snippet is pretty simple. Available once running via the Mac Menu Bar across the top of the screen, Snippet can either be directly invoked with a mouse click or accessed from the program you’re copying text from.

    A quick overview of Snippet is required before you start copying text into it. Left-clicking the icon on the Menu Bar (a pair of braces: {}) will open the Snippet box, into which you can paste code from another application.

    Clicking the cog button in the top right corner will give you access to the Preferences box from where you can manage how the application behaves in certain situations. For instance, on the General tab you can configure the hotkey combination to toggle the app, and the combo for creating new snippets from selections selected in other applications.

    It is also possible to sync Snippet with your MobileMe account, as well as import and export data and code. The Snippet Manager is also available via the cog menu, allowing you to search for code that you have previously saved.

  • slide 4 of 5

    Capture Text and Code with Snippet

    Using the hotkey combination to capture code from other applications is really easy. All you need to do is select the text that you want – for instance the source of a web page – and hit the hotkey combination to open Snippet and copy the selection into the app.

    You should then take advantage of the tag section at the bottom of the Snippet window which will help you to find the snippet later on. The best practice is to give the selection a short but meaningful name, and then add some descriptive tags concerning the type of code and its purpose.

    All Snippets are available for access later on in the Snippet Manager.

    This is an excellent application that any developer can use to keep track of code, and using the steps above you can see just how easy Snippet is to use!

  • slide 5 of 5

    References

    Screenshots and references from Snippet tool for Mac OS X.

    Download Snippet from Apple, http://www.apple.com/downloads/macosx/development_tools/snippet.html