Homesite/CF Studio tip (was: Re: [thelist] How do you store your snippets?)

Bruce Heerssen bheerssen at
Tue Feb 13 11:17:16 CST 2001

> Original Message:
> From: zac <zac at>
> Jon Hall wrote:
> > If you use Homesite or Studio from Allaire, it has a great snippet library
> > function built in. It also allows you to set a shared snippets folder, so
> > you can share with your co-workers.
> BBEdit on the Mac has Glossaries which are similar and they have one feature
> that Homesite and CF Studio doesn't in that you can place glossary items in
> subfolders. I have a PHP glossary in BBEdit that has functions arranged by
> category in subfolders making it very easy to navigate.

Actually, you *can* put subfolders in the snippets folder in HS/CFStudio, but
only one level deep. It would be nice if you could add more levels, but at least
there is some organizational capability. I'm not trying to start an
editor-of-choice war, just clear up a mis-conception. I'm sure BBEdit is a fine
editor, and perhaps superior to HS in this respect.

But the greatest use for snippets in HS/CFStudio is in conjunction with
shortcuts. By using shortcuts, you don't have to stop typing to select a snippet
with the mouse. You can set shortcuts for any tag or snippet. Some are included
by default, for instance: [Ctrl-Shift-p] will wrap <p> tags around selected

I'll wrap this in a tip for the harvester 'cause this one simple feature is a
HUGE time saver.

<tip type="HomeSite/ColdFusion Studio" author="Bruce Heerssen">

Shortcuts and Snippets: how-to

Creating snippets for many often used tags and assigning shortcuts to them can
result in tremendous time savings. Here's how:

1. Create a custom snippet by right-clicking in the snippets pane and choosing
'Add Snippet'. One I use all the time is <cfoutput></cfoutput>, with the start
tag in the upper pane of the snippet wizard and the end tag in the lower pane.
That will cause all selected text to be wrapped in a <cfoutput> tag set when the
snippet is used.

2. Open the 'Customize' dialog. Options/Customize in the menu bar, or just

3. In the 'Snippet Shortcuts' tab, select the snippet you just created and enter
the desired shortcut in the text field at the bottom of the dialog. Press
'Apply'. If the shortcut is already assigned to another snippet, a popup dialog
will let you know and allow you to overwrite the shortcut or cancel.

That's it. Couldn't be easier. Some of my snippets include <cfoutput></cfoutput>
(Ctrl-Alt-o), <cfparam name="" default=""> (Ctrl-Alt-p), and <cfquery name=""
datasource="#request.dsn#"></cfquery> (Ctrl+Alt+q). I also have snippets for
things like quotation marks and parenthesis. Those come in handy when cutting
and pasting variables or building expressions and functions.


More information about the thelist mailing list