This page explains how you can use Snippets to help make your code editing go faster.
Contents |
Introduction
Use the Snippets found in the Snippets View to help speed your code development. Aptana currently includes several types of code Snippets found in the following folders in the Snippets View. The lists below gives just a few examples of the many Snippets included with Aptana.
HTML
- Insert <form>, <table>, <head>, <textarea> and <link> templates - Inserts standard templates for the <form>, <table>, <head>, <textarea> and <link> tags into your HTML.
- Insert DOCTYPE - If the DOCTYPE in the standard Aptana HTML template is not the one that you would like to use, you can insert one of the listed DOCTYPES instead.
- Wrap with <tagName> - Wraps the selected text with the HTML tag specified by the snippet.
JS
- Wrap in comment - Wraps the selected text in a comment.
Snippet Templates
- Create new Snippet - Use any of the new Snippet templates (JS, HTML, CSS, or XML) to create a new Snippet for the corresponding file type. You'll then need to add this snippet to your snippets folder to access it. (See Adding a new Snippet for details.)
Instructions
To run a Snippet:
- Double-click the snippet to run the snippet.
- For snippets that wrap text in a pair of tags (e.g. Wrap with <b>, etc.), select the text that you want to wrap, and double-click the snippet.