In Aptana Studio 2, there was an option for users to have editor templates, which could be used to include multiple template tags. This functionality can be accomplished in Aptana Studio 3 through the use of snippets. This page will show how to convert existing editor templates to Aptana Studio 3.
Exporting Existing Editor Templates from Aptana Studio 2
- Highlight all the templates that you would like to export.
- Click on Export...
- Select the destination for your exported templates.
Editor Template Format
The editor template should be in an XML format. The top-level XML node should be a
<templates> node, with
<template> nodes as children.
Here is an example of an editor template with a single entry:
Converting a template entry
In this section, we will reference the editor template above and convert the template entry into a snippet. From the example above, each
<template> node would correspond to a snippet that will want to add to your ruble.
As you may know from the Creating a New Snippet section, there are three key items for a snippet (trigger, expansion, and scope). The relationship between the template node and the key items are as follows:
- trigger: The 'name' attribute.
- expansion: The content inside the
The description attribute of "Function" also corresponds to the description of the snippet.
The snippet for the template would look like: