Using Snippet: Mac OS Software Guides

Using Snippet: Mac OS Software Guides
Page content

Manage Code with Snippet

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)

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!

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.

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!

References

Screenshots and references from Snippet tool for Mac OS X.

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