The PROPS tag and the PROPERTY tags inside it are used to define mode-specific properties. Each PROPERTY tag must have a NAME attribute set to the property's name, and a VALUE attribute with the property's value.
All buffer-local properties listed in the section called "Buffer-Local Properties" may be given values in edit modes. In addition, the following mode properties have no buffer-local equivalent:
commentEnd - the comment end string, used by the Range Comment command.
commentStart - the comment start string, used by the Range Comment command.
lineComment - the line comment string, used by the Line Comment command.
doubleBracketIndent - If a line matches the indentPrevLine regular expression and the next line contains an opening bracket, a level of indent will not be added to the next line, unless this property is set to "true". For example, with this property set to "false", Java code will be indented like so:
while(objects.hasMoreElements()) { ((Drawable)objects.nextElement()).draw(); } |
On the other hand, settings this property to "true" will give the following result:
while(objects.hasMoreElements()) { ((Drawable)objects.nextElement()).draw(); } |
indentCloseBrackets - A list of characters (usually brackets) that subtract indent from the current line. For example, in Java mode this property is set to "}".
indentOpenBrackets - A list of characters (usually brackets) that add indent to the next line. For example, in Java mode this property is set to "{".
indentPrevLine - When indenting a line, jEdit checks if the previous line matches the regular expression stored in this property. If it does, a level of indent is added. For example, in Java mode this regular expression matches language constructs such as "if", "else", "while", etc.
Here is the complete <PROPS> tag for Java mode:
<PROPS> <PROPERTY NAME="indentOpenBrackets" VALUE="{" /> <PROPERTY NAME="indentCloseBrackets" VALUE="}" /> <PROPERTY NAME="indentPrevLine" VALUE="\s*(((if|while) \s*\(|else|case|default)[^;]*|for\s*\(.*)" /> <PROPERTY NAME="doubleBracketIndent" VALUE="false" /> <PROPERTY NAME="commentStart" VALUE="/*" /> <PROPERTY NAME="commentEnd" VALUE="*/" /> <PROPERTY NAME="blockComment" VALUE="//" /> <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" /> </PROPS> |