By: Adrian Senior
Page 1 of 1
We all have our favourite extensions and I'm no exception. Some people collect them and have extensions for everything, whether they use them or not, and some folks have just a few. I fall into the latter category. In this occasional series I thought I would catalogue some of the extensions that I use on a regular basis. Extensions that speed up my productivity are a particular favourite of mine and Tom Muck's Sniplets extension is one such tool that I use a great deal. It isn't a commercial extension, it is absolutely free, costs nothing but your time to download and install it.
But Dreamweaver Already has a Snippets Panel!
Yes it does. The Sniplets extension is slightly different though in that it installs into the insert bar and that for me means it is easier and quicker to access than Dreamweaver's native snippets panel. Let's take a little look at how it works, it really couldn't be much easier.
Adding a sniplet from a selection is as easy as you like, simply high-light the code you wish to make a sniplet and right-click to access the Sniplets extension from the context menu. From here you can select the Add new from selection option.
Image 1: Selecting your option from the context menu
Once you have selected the Add new from selection option you are provided with the ability to name your new snippet via the Prompt dialog box. Naming conventions here are a good thing, the Sniplets extension doesn't allow for folder creation—as yet, I'll get Tom to edit this and you never know ;)—so I name my sniplets in manner that allows them to be easily grouped. You'll note the name in Image 2 begins with CSS and this will sit within the CSS sniplets I use.
Image 2: Prompted to name your snippet
On clicking OK the Prompt dialog box closes and your new sniplet is created. You can access the sniplet by clicking the button on the insert toolbar and selecting the Edit list option at the base of the Sniplets menu.
Image 3: Select Edit list
On selecting Edit list the Sniplets dialog window opens, this is where you can manage your code sniplets. Starting at the top with the Set Name: field you can change the name of your sniplet whenever you feel the need, clicking the Save button to the right of that field saves any change you made to the name.
You can automatically sort your sniplets by clicking the Sort button or you can arrange them into any order you prefer by using the Up and Down arrows while the sniplet you want to move is selected in the Sniplet column. You'll notice that when you select a sniplet in the Sniplet column its code is shown in the bottom window, the code is editable in this window and clicking the Save button on the bottom left of the Sniplets dialog window will save changes you make to the code; a very handy feature.
Image 4: The Sniplets Dialog Window
This leaves the four buttons on the right, clicking OK will close the window once you have completed any edits. You can click Cancel to exit the dialog window without saving changes, but the real important stuff is the Import and Export buttons. Clicking the Export button will export all your sniplets in one fell swoop and you can back them up in a location of your choice. The Import button allows you to import your snippets in one fell swoop should the need ever arise.
Other options include allowing you to add new snippets directly from the clipboard while the Clear list option will remove all snippets from the extension and allow you to import specific sets of snippets that suit the work you are doing at any given time. The snippets are also compatible with Dreamweaver's snippets and can be used in conjunction with Massimo's free Snippets Exporter.
The Sniplets Extension is a great addition to your work-flow, it keeps all the repetitive code fragments you use right at your finger tips ready and raring to go whenever they are called on. You can grab a copy of Tom's Sniplets extension from his website at tom-muck.com enjoy.
Until next time :~)
Page 1 of 1 1