08
Jun

Snippets Here, Snippets There, Snippets Everywhere - Part II

In Part I of this series we discussed Snippets in Dreamweaver. This article discusses how to use and create snippets in HomeSite+, a popular HTML editor by Macromedia.

Yesterday we discussed some basics of HomeSite. Today we will learn to use and create snippets in HomeSite to further automate the web development process.

Open HomeSite.

From the Resource Tabs select the Snippets HomeSite Snippets. If the Snippets tab is not available you can access it via View > Resource Window > Snippets.

The Snippets that are available in Dreamweaver are also available in HomeSite. From what I understand, Snippets that were created in Dreamweaver MX are not compatible with HomeSite. I think with Dreamweaver MX 2004 this issue has been corrected. If you come across snippets that don’t work you may want to try this Snippets Converter Extension.

Inserting Snippets

HomeSite Snippets FoldersThe Snippets panel is organized with folders; the folders are organized by the type of content or code to be added to the page. There are about 10 snippet folders. Click the plus sign next to any of the snippet folders to see the individual snippets or subfolders.

To add a snippet to your document position your cursor where you would like the snippet to be inserted. In the Snippets panel, double click the snippet you would like to insert or click the snippet once and click the Insert Snippet button Insert Snippet on the Snippet Panel or drag the snippet from the panel into your XHTML Code.

Creating Snippets

Creating a new snippet is easy too. First create a new snippet folder to store your snippets in by clicking the Create New Snippet Folder icon Snippet Folder in the Snippet panel. Give the folder a descriptive name and press Enter on your keyboard.

Once the folder is created, type the XHTML, HTML, CSS, JavaScript or PHP code that you would like to use in the snippet in the HomeSite document window.

Make sure that the folder that you want to store your snippet in is selected in the Snippet panel. Highlight the code that you want to create a snippet from and press CTRL+C to copy the code.

Click the Create New Snippet icon Create New Snippet and the Snippet dialog box will appear.

Create a new snippet in HomeSite

Give you Snippet a Name and Description. Click inside the Start Text box and press CTRL+V to paste the code you would like to use as the snippet. The End Text box is used for closing tags.

You can assign shortcut keys to snippets that you use often. Click in the Shortcut box and press the shortcut key combination that you would like to use. If the shortcut is already being used a warning box will appear.

Click Ok and you’re done!

2 Comments

LEAVE A COMMENT

Comments RSS Feed   TrackBack URL