Navigation: TextEd > Syntax files >

Syntax Options

 

 

 

 

There are several options you can add to a syntax definition file. You only have to include the options you actually need.

 

AllowNestedComments

Syntax

AllowNestedComments=<string>

Description

Set this to "Yes" if you want to allow the use of nested comments.

Example

/* Comment block

   /* Nested comment block */

   we are still in comment block

*/

 


CommentEsc

Syntax

CommentEsc=<string>

Description

In e.g. LaTeX a comment is written after a ( % ) sign. To write the actual ( % ) sign (not comment) you type ( \% ). For the editor to handle comments and the sign ( % ) set the comment escape to ( \ ). Now the ( \% ) sequence isn't highlighted as a comment.

 


CommentStartA

Syntax

CommentStartA=<string>

Description

The string is used to identify the start of a comment.

Example

CommentStartA=/*

 


CommentEndA

Syntax

CommentEndA=<string>

Description

The string is used to identify the end of a comment.

Example

For the comment block below we can use the following options:
 

CommentStartA=/*

CommentEndA=*/

 

/*

This is a block comment, or a

multi line comment.

*/

 


CommentStartB

Syntax

CommentStartB=<string>

Description

The string is used to identify the start of a comment.

Example

CommentStartA=(*

 


CommentEndB

Syntax

CommentEndB=<string>

Description

The string is used to identify the end of a comment.

Example

CommentEndB=*)

 


LineCommentA

Syntax

LineCommentA=<string>

Description

The string is used to identify a line comment.

Example

LineCommentA=//

 


LineCommentB

Syntax

LineCommentB=<string>

Description

The string is used to identify a line comment.

Example

LineCommentB=;

 


 

OnlyLineCommentIfFirstCharA

Syntax

OnlyLineCommentIfFirstCharA=<0|1|2>

Description

Line comment character A should only start a line comment when it's the first non-white space character on the line (value=1) or the first character on the line (value=2).

Example

With OnlyLineCommentIfFirstCharA=1
 

' This is a line comment
 

... some text here ' this is not a line comment

 


OnlyLineCommentIfFirstCharB

Syntax

OnlyLineCommentIfFirstCharB=<0|1|2>

Description

Line comment character B should only start a line comment when it's the first non-white space character on the line (value=1) or the first character on the line (value=2).

 


Char

Syntax

Char=<string>

Description

The char option is used to identify a character bracket.

 


String

Syntax

String=<string>

Description

The string option is used to identify a string bracket.

 


StringOnLine

Syntax

StringOnLine=<Yes|No>

Description

Tell the editor if a string should span several lines or just one. This can differ for different programming languages.

 

 

VerbatimStringStart

Syntax

VerbatimStringStart=<character>

Description

In C# you can enter a @ character before the string to have the string containing any characters, including characters usually treated as escape characters. The verbatim string does not have escape sequences.

 

So the statement:

 

test=@"c:\Test\test.doc";
 

is same as:

 

test="c:\\Test\\test.doc"; .

 


HereDocSymbol

Syntax

HereDocSymbol=<string>

Description

The string is used to identify a HereDoc.

Example

HereDocSymbol=<<<

 


HexIdentifier

Syntax

HexIdentifier=<string>

Description

Most programming languages have a hexadecimal identifier. It can be a (0x) or a (#) sign. Or it can be something else.
 

(Note! The tool "Colors" uses this identifier when inserting a color into your text. It is always inserted as a hexadecimal number.).
 

 

Escape

Syntax

Escape=<string>

Description

Most programming languages that uses a string also have an escape char. E.g. the (\) char.

 


AllowEscapeOutsideString

Syntax

AllowEscapeOutsideString=<Yes|No>

Description

In most programming languages a string escape is only used inside a string. But in some languages it is valid to escape a beginning of a string (outside a string). This option is used with the Perl syntax.

 


Numbers

Syntax

Numbers=<string>

Description

Enter the chars that should be identified as numbers. E.g. Numbers = "0123456789"

 


DigitSeparator

Syntax

DigitSeparator=<char>

Description

Numbers in e.g. C++ may have a digit separator. E.g. int nr = 1'000'000, where ' (single quote) acts as a separator.

 


Symbols

Syntax

Symbols=<string>

Description

The editor uses the symbols entered here to separate words (a space char is always used to separate words). Add your values here very carefully.

Example

If you add the following in a CSS syntax file:

 

Symbols=()
 

could generate the following result:

{FONT-FAMILY: ARIAL,HELVETICA} 
 

but with:
 

Symbols=():,

 

you get:

{FONT-FAMILY: ARIAL,HELVETICA}
 

The symbols ":," are very important in CSS and are used to separate properties and values.

 


SymbolWords

Syntax

SymbolWordsA=<value> <value> <value>

SymbolWordsB=<value> <value> <value>

SymbolWordsC=<value> <value> <value>

Description

The editor uses the symbols entered here to separate words (a space char is always used to separate words). Add your values here very carefully.

Think of them as arrays with values separated by spaces. Each value has to have the same width. You can use up to 3 symbol word arrays with different value sizes. All symbols used must also exist in the "Symbols=" string. The larger width values should be declared first.

Example

If you add the following in a syntax file:

 

Symbols

{}\*?

SymbolWordsA

\* \? \\

SymbolWordsB

\ { }


 

"\*", "\?" and "\\" will be highlighted with its own color. "\", "{" and "}" with another color and the rest of the symbols will be colored using the symbol color.

 


CaseSensitive

Syntax

CaseSensitive=<Yes|No>

Description

Tells the editor if the keywords should be identified with or without case sensitivity.

 


TagCaseSensitive

Syntax

CaseSensitive=<Yes|No>

Description

Tells the editor if the tag should be identified with or without case sensitivity.

 


HighlightUrl

Syntax

HighlightUrl=<Yes|No>

Description

Tells the editor that hyper links in the text should be highlighted and can have its own color.

 


AutoCompleteTags

Syntax

AutoCompleteTags=<Yes|No>

Description

All tags or block with a start string of "<" and an end string of ">" can be auto completed. This option is set to "Yes" in the XML syntax file.

Example

In XML when you enter <LastName> the stop tag is inserted and the cursor is placed in between
 

<LastName>|</LastName>
 

Tags that ends with "/>" are ignored. This option could work in the HTML syntax as well, but only if you always use xHtml. It wont work in HTML with tags like <br> since it doesn't have a closing tag.

 


AddProjectClassesToCompletion

Syntax

AddProjectClassesToCompletion=<Yes|No>

Description

If you have created a project and if it contain classes, this option tell the editor to add those classes to the list when auto completion and the user menu is invoked.

 


AutoCloseBraceStart, AutoCloseBraceEnd,

AutoCloseBlockStart, AutoCloseBlockEnd

Syntax

AutoCloseBraceStart=<string>

AutoCloseBraceEnd=<string>

AutoCloseBlockStart=<string>

AutoCloseBlockEnd=<string>

Description

Tell the editor what to use with the option to automatically close blocks and braces.

Example

E.g. The programming language can use the braces:

 

(), [], ""

 

and a block is enclosed by {...}

 

So we enter:

 

AutoCloseBraceStart

(["

AutoCloseBraceEnd

)]"

AutoCloseBlockStart

{

AutoCloseBlockEnd

}

 

 

 

AddProjectClassesToCompletion

Syntax

AddProjectClassesToCompletion=<Yes|No>

Description

If you have created a project and if it contain classes, this option tell the editor to add those classes to the list when auto completion and the user menu is invoked.

 


OnlyHighlightInBlock

Syntax

OnlyHighlightInBlock=<Yes|No>

Description

Tells the editor to only highlight code within a block. This is used in e.g. CSS where we only want the editor to highlight text inside the { ... } brackets.

 


EndOpenBlockAt

Syntax

EndOpenBlockAt=<string>

Description

Tells the editor to end an open block at one of these characters. This is e.g. used in the JScript syntax for regex modifiers.

 


AutoCompleteCharA, AutoCompleteCharB

AutoCompleteCharC

Syntax

AutoCompleteCharA=<char>

AutoCompleteCharB=<char>

AutoCompleteCharC=<char>

Description

This character is used to trigger auto completion. In most programming languages this should be a dot (.).

 


HintCharStart

Syntax

HintCharStart=<char>

Description

Hints can be used to with function to display parameters. Usually a left bracket "(" is used, but can be anything you want. If nothing is entered "(" is assumed.

 


HintCharEnd

Syntax

HintCharEnd=<char>

Description

Hints can be used to with function to display parameters. Usually a right bracket ")" is used, but can be anything you want. If nothing is entered ")" is assumed.

 


AllowHighlightBetweenTags

Syntax

AllowHighlightBetweenTags=<Yes|No>

Description

If set to yes the editor will check text between tags and highlight found elements. Normally this option is set to no. E.g. text between HTML or XML tags should not be highlighted.


 



 

 

 

 

Copyright © 2024 Rickard Johansson