-
Notifications
You must be signed in to change notification settings - Fork 31
Template Editor
A Play2 Template is a simple text file that contains small blocks of Scala code. Templates can generate any text-based format, such as HTML, XML or CSV.
Below follows the set of features that are currently supported for Template files.
Syntax Highlighting for:
- HTML Tags: It provides different coloring for attributes, tag name, values, and string literals.
- Scala Code: It provides different coloring for different tokens of scala.
- Comments
Also it has preference for Play2 Template custom keywords:
It shows compilation errors, in two levels.
- Compiling from template file into scala file.
- Compiling result scala file.
Whenever you go over a Scala identifier, it will show you its type.
You can hyperlink to elements of another Scala source file (Hyperlinking for elements of another template file or java file is not supported at the moment).
By using CTRL+SPACE
(COMMAND+SPACE
on Mac OSX) you can get the usual code completion popup inside Scala fragments.
The template editor follows a very simple heuristic to automatically indent after a new-line character. By default, it indents to the previous line, except if there is an open parenthesis/brace on the current line, when it increases the indent by the tab size.
You can control the tab size and the tab-vs-spaces setting in the Editors -> Text Editors
Eclipse configuration.