Editor Templates

Templates are a structured description of coding patterns that reoccur in source code. The Maple editor supports the use of templates to fill in commonly used source patterns. Templates are inserted using content assist (Ctrl+Space).

For example, a common coding pattern is to iterate over the operands of an expression using a for loop. By using a template for this pattern, you can avoid typing in the complete code for the loop. Invoking content assist after typing the word for will present you with a list of possible templates for a for loop. You can choose the appropriate template by name ( iterate over the operands of an expression ). Selecting this template will insert the code into the editor and position your cursor.

Templates can contain template variables. Variables mark the editable locations.

Many common templates are already defined. These can be viewed with the Maple > Templates preference page. You can also create your own templates or edit the existing ones.