Adding items to snippets drawers

Procedure

  1. Do one of the following choices:
    To start with this item: Do this action:
    An empty item that you can edit Right-click anywhere in an existing drawer, select Customize, and click New > New Item.
    Existing text that is pasted into a new item in an existing drawer Copy or cut text to the clipboard. In the Snippets view, right-click anywhere in an existing drawer and click Paste.
    Existing text that is pasted into a new item in a new or existing drawer Select the text, right-click and then select Add to Snippets. In the New Category dialog box, specify the name of the drawer to which you want to add the item, and click OK.
    A Customize Palette window appears.
  2. Type a name for the new item, and provide a description. The value that you type in the Name field appears next to the item icon in the Snippets view.
  3. To include in the Template Pattern field, a variable that you already defined, click Insert Variable Placeholder. A variable placeholder is a marker that, when tagging is inserted into the active file, is replaced by the value that is entered into the Insert Template:Item_name dialog at insertion time. Clicking Insert Variable Placeholder or typing Ctrl+Space activates a pop-up in the text area that prompts you to create a marker for the variable. For example, if you create two variables that are named uri and prefix, and create variable placeholders for both, the template pattern might look like the following example:
    <%@ taglib uri="${uri}" prefix="${prefix}" %>
  4. Click OK.

Results

The new item is added to the list of items in the appropriate drawer.
Icon that indicates the type of topic Task topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: tsrcedt015.html