User to user discussion and support for UltraEdit, UEStudio, UltraCompare, and other IDM applications.

Syntax highlighting, code folding, brace matching, code indenting, and function list
4 posts Page 1 of 1
Hello,

I have written a template for creating a new language files. It contains all the currently available tags so one can just open it and edit it to his needs without constantly referring to the help file.

I hope that someone might find it useful.

I would welcome your comments to this template. Especially if all my statements there are true, if it is understandable and if I have not missed anything important.

Regards, Dalibor

History:

  • Updated on 09.01.2007 the template according to Mofi's comments.
  • Updated on 09.01.2007 - spell checked and reformatted to 80 chars/line.
  • Updated on 29.12.2007 by Mofi - completely revised and reformatted.
  • Updated on 02.08.2009 by Mofi - added new facts about max. length of function strings and usage of Perl function strings.
  • Updated on 31.03.2012 by Mofi - added information about hierarchical function strings which can be used since UE v16.00 and UES v10.00.
  • Updated on 31.03.2012 by Mofi - added information about usage of up to 20 color groups with UE v17.00 and UES v11.00 or any later.
  • Updated on 29.05.2012 by Mofi - added EnableCFByIndent introduced with UE v18.10 and UES v12.10.
  • Updated on 22.03.2014 by Mofi - improved explanation on open/close comment fold strings.
  • Updated on 05.03.2015 by Mofi - added information about case-sensitivity of line and block comments.
  • Updated on 12.02.2017 by Mofi - added information about case-sensitivity of alternate line comments.
  • Updated on 12.02.2017 by Mofi - added /LanguageMarker = introduced with UE v24.00 and UES v17.00.
  • Updated on 26.06.2017 by Mofi - added JSON_LANG introduced with UE v24.10 and UES v17.10.
Attention: You can copy the template below to a new ASCII DOS file or to an existing wordfile and use it to create a language definition. But you have to delete all lines starting with # because they are just comments and comments are not possible in a wordfile. You also have to replace tab by a real horizontal tab character in the line starting with /Delimiters =. Wordfiles must have DOS line endings (carriage return CR + linefeed LF). UNIX or MAC line endings as well as any Unicode encoding are not allowed.



# Template for creating a new language files
# Created by Dalibor Jelinek - 09.01.2007
# Revised by Mofi last time on 26.06.2017
#
# The wordfile keywords are case sensitive and therefore must be specified
# exactly as written here or in help of UltraEdit. It is also important
# that after a keyphrase the character sequence single space, equal sign,
# single space (" = ") follows before the string you want to assign to
# the declaration. For example Line Comment=// is not recognized
# by UE or UES because of the missing spaces.
#
# The whole wordfile can be up to 372 KiB.
#
# Using tabs is not recommended, except in /Delimiters = .
#
# Every line starting with a single / followed by an unknown word is ignored
# by the syntax highlighting function. This could be used for line comments
# inside the wordfile, for example /cmt: at start of the line could be used
# for a comment line. But per definition comments are not possible in a
# wordfile and so such comments should not exist when mailing a wordfile
# to IDM for the public download area or when testing a language definition
# with Mofis SyntaxTools macros. Such "comments" might cause also problems
# in the future.
#
# You might want to rename your tweaked wordfile.txt or wordfile.uew to
# a different name (and adjust UltraEdit configuration accordingly) so it
# does not get overwritten when installing a newer version of UltraEdit.
# You might want to use a different extension than TXT (like UWE) in your
# wordfile to syntax highlight the wordfile too.
#
# The maximum length of Language Name and Color Group Name may be up to
# 24 characters long. Every name longer is truncated. In previous versions
# of UltraEdit the limit was 18 characters. A creator of a public wordfile
# should not exceed the first limit of 18 characters or at least make sure
# the first 18 characters produce a unique description for a color group
# within the language definition.
#
# All the information provided is valid to the date of writing
# and for UltraEdit v13.20a.
#
# Please post your comments here:
# http://forums.ultraedit.com/topic4124.html


# Language Definition Line
# The following declarations must be specified all on the first line
# of a language definition - the language definition line. It does
# not matter how long the line will become. Do not break the line.


/L20"Language Name" Line Comment = // Line Comment Alt = # File Extensions = ext
# /Ln - Language number (1-20); must be unique in wordfile.
# It must be right at the beginning of the line.
# Languages 1-13 are included with UltraEdit by default.
# "Language Name" - up to 24 characters; must immediately follow /Ln.
# UltraEdit prior v9.00 support only up to 10 languages in a wordfile.


# Language Markers
# AASM_LANG ASP_LANG C_LANG COBOL_LANG CSHARP_LANG CSS_LANG ECMA_LANG
# FORTRAN_LANG HTML_LANG JAVA_LANG JSCRIPT_LANG JSON_LANG LATEX_LANG
# MASM_LANG MATLAB_LANG NASM_LANG PASCAL_LANG PERL_LANG PHP_LANG
# PLB_LANG PUREBASIC_LANG PYTHON_LANG RUBY_LANG SQL_LANG VB_LANG
# VBSCRIPT_LANG XML_LANG XSL_LANG
# Those markers are used to define the type of a language for correct
# highlighting of multiple languages in a single file (like PHP in HTML)
# and to apply built-in defaults for brace strings, fold strings, etc.
# Every language which might be embedded in another should be marked
# by its marker.
# With HTML_LANG and XML_LANG, FORTRAN_LANG and LATEX_LANG there is a
# special handling activated in UltraEdit and UEStudio according to the
# special requirements of these languages. See UE/UES help page about
# Syntax Highlighting for further details.
# A wordfile with JSON_LANG introduced with UE for Windows v24.10 and
# UEStudio v17.10 applied to an opened file enables the JSON manager
# for the opened file.
# Only one instance of every language marker is allowed in a wordfile!
# Multi-language highlighting (for HTML file types only) is supported
# since UltraEdit v11.00.


Nocase
# Defines that the language is not case sensitive. The keywords in the
# up to 8 color groups are then converted internally always to lowercase
# (important for auto-completion).
# Depending on the version of UltraEdit the Nocase declaration is also
# applied to ASCII letters in brace and fold strings making them internally
# always lowercase and the case of the brace and fold string letters in the
# file to highlight is not important anymore as without Nocase. The
# case-sensitivity of line and block comments depends also on this keyword
# since UE v21.20.0.1009 and UES v14.30.0.1008. In prior versions the line
# comment strings are always interpreted case-sensitive and the block
# comment strings case-insensitive.
# Alternate line comments are interpreted correct case-insensitive
# with Nocase in first line since UE v24.00 and UES v17.00.


Line Comment = string
# String marking the rest of a line as a comment. Up to 5 characters
# long. A line comment declaration must exist to be able to use the
# Comment Add / Remove commands in menu Edit.


Line Comment Alt = string
# Alternative string marking the rest of a line as a comment. Up to
# 5 characters long. The comment color is also used for alternative
# line comments.


Line Comment Num = ncc
# Allows to define a line comment containing space(s). n is number of
# consecutive characters which defines a line comment. For example:
# Line Comment Num = 3# !


Line Comment Preceding Chars = [RegExp]
# Defines the valid characters which can appear left to a line comment.
# RegExp is regular expression in UltraEdit style. The default is
# that all characters left to a line comment string are valid. This
# definition is supported since UltraEdit v9.10.


Line Comment Preceding Chars Alt = [RegExp]
# Defines the valid characters which can appear left to an
# alternative line comment. See above for further details.


Line Comment Valid Columns = [i-j,k]
# Defines the valid columns where the line comment can appear. There can be
# up to 10 ranges defined. Depending on your version of UltraEdit the first
# column of a line has either the number 0 or 1. Best test your language
# definition once with 0-x and once with 1-x and use the version which
# works for your version of UE. The default is that all columns are valid.
# This definition is supported since UltraEdit v9.10.


Line Comment Valid Columns Alt = [i-j,k]
# Defines the valid columns where the alternative line comment
# can appear. See above for further details.


Block Comment On = string
Block Comment Off = string

# Strings that enclose a block comment. Up to 19 characters long (in older
# versions only up to 5 characters). A block comment on/off string cannot
# include a space character. /* and */ are default for files with extension
# C and CPP (can be overridden). If Block Comment On is defined but Block
# Comment Off is not defined, then it works like a third set of Line Comment.


Block Comment On Alt = string
Block Comment Off Alt = string

# Second set of strings enclosing a block comment. Up to 19 characters long
# (in older versions only up to 5 characters). If Block Comment On Alt is
# defined but Block Comment Off Alt is not defined, then it works like a
# third or fourth set of Line Comment. While Line Comment, Line Comment Alt
# and Block Comment On are highlighted with the Comments color, the alternate
# block comment has its own color setting. So if a language has 2 different
# line comments, but only 1 block comment, it is sometimes better to use
# Block Comment On Alt for the second line comment instead of using Line
# Comment Alt.


NestBlockComments
# UE v13.00 and UES v6.20 and later versions support nested block comments.
# UltraEdit/UEStudio by default will end any block comment whenever a single
# block comment end string is encountered. To instruct UltraEdit/UEStudio to
# explicitly match all block comment start strings with all block comment
# end strings, the nest block comment declaration may be specified.


Noquote
# Turns off the default recognition of characters in single quotes
# and double quotes as literal strings. Using this keyword means the
# language does not have strings or string highlighting is not wanted
# or is done with different methods (marker characters or substrings).


String Chars = cc
# Defines the characters enclosing the literal strings. 1 or 2 characters
# only. Default string characters are ' and ". Additionally if you have
# 2 characters for the strings defined (or using the defaults) and you wish
# to have a different color for each type of string, you may include one of
# the characters (i.e. the double quote) in one of the color groups in a
# line by itself. This will override the configurable color for the strings
# that are encapsulated by this character.


Escape Char = c
# Defines the escape character which allows the string character
# to be used inside a string.


String Literal Prefix = c
# UE v13.00 and UES v6.20 and later versions support the specification
# of the string literal format by specifying a string prefix character
# in the language definition line as required for example for C#.


EnableMLS
DisableMLS

# Enables/disables the support for multi-line string highlighting.
# EnableMLS - enables to correctly highlight strings spread over more
# lines (containing end-of-line character).
# DisableMLS - string highlighting is ended by the end of the line,
# even if the string closing character is missing.
# UltraEdit has defaults for multi-line string highlighting capability for
# many languages. Those keywords are to override the defaults behaviour.
# Multi-line string highlighting is supported since UltraEdit v11.00.


EnableSpellasYouType
# By default UE/UES will not perform "spell check as you type" on any
# syntax-highlighted files. To change this setting and allow "spell check
# as you type
" for a syntax-highlighted file, add this keyword to the
# language definition line. Spell check while typing is supported since
# UltraEdit v13.00 respectively UEStudio v6.20.


EnableCFByIndent
# UE v18.10 and UES v12.10 and later versions support code folding based on
# indent level in addition to code folding based on fold strings. For Python
# files (*.py) code folding by indent is automatically enabled. For all
# other files respectively languages this keyword can be used in the first
# line to enable code folding by indent instead of code folding by fold
# strings. If EnableCFByIndent is present in first line, do not specify any
# fold strings as they are ignored. Read below about Code Folding
# using fold strings.


File Extensions = ext1 ext2 ...
# Defines to which extensions this language definition will be applied.
# The file extensions declaration must be the last one on the language
# definition line. It is not possible to use also "File Names = " on
# a language definition line which already has a file extensions list.
#
# File extensions must be specified without point. (The point is per
# definition by Microsoft not part of the file extension.) The file
# extensions are not case sensitive because on Windows operating
# systems every file system handles file names not case sensitive.
#
# Up to 97 bytes may follow the "File Extensions = " declaration.
# If a list of file extensions exceeding 97 bytes is specified here, they
# will not all be parsed.
#
# You can use * as a file extension to highlight all files not specified
# at any language definition (for example new files). Very important is
# that the * must be the last (most right) in the list of extensions.
#
# Since UltraEdit v12.20 and UEStudio v6.10 at "Configuration - Editor
# Display - Syntax Highlighting - Highlight new files as a language"
# can be specified to be used for new files and so this trick must not be
# used anymore for new files. But it can be still used for automatically
# selecting a syntax highlighting for all already saved files with not
# known file extension or name.


File Names = filename1.ext1 filename2.ext2 ...
# Defines to which file names this language file will be applied.
# The file names declaration must be the last one on the language
# definition line. It is not possible to use also "File Extensions = "
# on a language definition line which already has a file names list.
#
# The file names specified must include their extensions. File names with a
# space inside the file name cannot be specified because the space character
# is used as names delimiter in the wordfile. Quotes cannot be used for file
# names with a space character. The file names are not case sensitive
# (according to Windows standard).
#
# Up to 125 bytes may follow the "File Names = " declaration.
#
# When using a language definition with a file names declaration for a
# type of file where also a language definition with a file extensions
# declaration exist in the wordfile, for example to highlight special
# XML files based on their file names different to all other XML files
# highlighted based on file extension XML, it is important that the
# language definition with the file names declarations has a lower
# language number and is above the language definition with the
# file extension declaration.
#
# Syntax highlighted based on file names is supported since UE v10.00.


# All the keywords above must be on the first language definition line.
# ---------------------------------------------------------------------
# From here below every keyword is on its own line.


# Shebang Parsing
/LanguageMarker = shebang
# or
/LanguageMarker = "name1" "name2" "name3"
# Shebang detection for syntax highlighting was added with UE v21.20 and
# UES v14.30 without being custimzable in wordfiles. This was changed
# with UE v24.00 and UES v17.00 introducing /LanguageMarker.
#
# There are two methods for shebang definition with /LanguageMarker:
#
# The first one specifies the shebang completely with #!/path/file. In this
# case the first line of an opened file not matched by File Names = or
# File Extensions = and also not matched by a built-in shebang detection
# must have exact this shebang to be highlighted with the language defined
# in this wordfile. Example: #!/bin/ksh
#
# The second one is specifying in double quotes just one or more names of
# executable files without #! and without path. In this case the first line
# of an opened file not matched by File Names = or File Extensions = and
# also not matched by a built-in shebang detection must start with #! and
# after any path must end with one of the defined names to be highlighted
# with the language defined in this wordfile. Example: "csh" "ksh" "sh"


# Delimiters
/Delimiters = ! "tab$%&'()*+,-./:;<=>?@[\]^_{|}~
# Defines a list of delimiters used to determine where a keyword starts
# and finishes.
# "tab" must be replaced after copying from the browser window
# to the ASCII file by a real horizontal tab character.
#
# A character which is a delimiter may not be part of the keyword, with
# an exception of <, </ and > in HTML_LANG and XML_LANG which can
# be at start or end of a keyword.
# Since UE v10.00 it is allowed that a delimiter character is the
# start character of a keyword or substring in the color groups.
#
# The default delimiters are used if no delimiters are specified.
# Delimiters should contain always a SPACE and a TAB character.
# It is possible to add delimiter characters in various color
# groups to highlight them in different colors.


# Function Definition Strings
/Function String = "%[a-z]*)"
/Function String 1 = "%[a-z]+^(*^))"
/Function String 2 = "%/L[0-9]+"^(*^)"
/Function String 3 = "%^[*^]$"
/Function String 4 = "%^([a-z_0-9^[^]*]+^)[ ^t]+([^p*&:, ^t^[^]a-z_0-9.!]++)[~;]"
/Function String 5 = "%*^{Sub^}^{Function^}*("

# Strings in quotes are regular expressions in UltraEdit's style which
# allows to extract a function name from a line of code and display it
# in a Function List in UltraEdit.
# Up to 6 function strings might be defined.
# Use a tagged expression to display only a part of the line -
# enclose the function name in ^( and ^).
# The regular expression string inside the double quotes should not be
# longer than 119 characters. With UE v13.00 and UES v6.20 and later
# versions it can be also longer because this limit was abolished.
# UltraEdit prior v9.00 support only 3 function strings per language.
# UltraEdit prior v8.00 support only 1 function string per language.
# The regular expression search(es) are always executed not case sensitive.
# So the regular expressions [A-Za-z], [a-z] or [A-Z] match all 3 always
# all ASCII letters independent of the case. Therefore using A-Za-z in a
# character set definition [...] does not really make sense.

# The function string definitions as explained above can be used in a wordfile
# for any version of UltraEdit or UEStudio. But since UE v16.00 and UES v10.00
# an alternate set of function strings can be used because of enhancing the
# function list from a flat list to a hierarchical list by IDM. To define
# function strings for a hierarchical list, it is best to remove the lines
# starting with /Function String if already present and save the wordfile.
# Next either open Advanced - Configuration - Function List, select the
# language to modify and click on button Modify Groups. Alternatively and
# even better is to have a file open syntax highlighted by the wordfile to
# update or define the hierarchical function strings, open the Function List
# view if not already open, right click into the Function List view and left
# click on context menu item Configuration. The syntax of the unlimited
# function strings for a hierarchical function list is not explained here
# because it is much more easier to define them in the dialog and let
# UE/UES update the wordfile then define them directly in the wordfile.


/Regexp Type = Perl
# Since UE v13.10 and UES v6.30 the function strings can be also
# Perl regular expressions instead of UltraEdit regular expressions.
# For Perl regexp function strings above line must be added to the
# language definition. The Perl compatible regular expression engine is
# more powerful than the UltraEdit regexp engine. With the Perl engine
# it is also possible to use more than one ( ) pair in the expression to
# determine which parts of the found string should be displayed in the
# function list view. The matching strings of all the expressions inside
# ( ) are concatenated with a space between the string parts. But when
# using the Perl engine one ( ) pair must exist in the regexp string or
# nothing will be displayed in the function list view. With the UltraEdit
# engine only the string of the first ^( ^) tagged expression is displayed
# in the function list view. So for an UE function string it does not make
# sense to specify more than on ^( ^) pair in the regexp function string
# in the wordfile.


# Indent Strings
/Indent Strings = "{" "if" "else" ":" "Then" "Select Case" "Do" "Do While" "<td>" "<tr>"
/Unindent Strings = "}" "End" "Next" "End If" "End Select" "Loop" "End Select" "Loop While" "Else" "</TD>" "</tr>"

# When such a string is contained in the line of code, UltraEdit
# can automatically indent the block of code lying in between them.
# Used for Format - ReIndent Selection and when configuration
# setting Auto indent new lines is enabled.
# /Indent Strings SOL = "#"
# Deprecated keyword.
# There has been a change to the way syntax highlighting works as support
# for these functions has evolved. It used to be necessary to define when
# an indent string occurred at start of line (SOL) because normally this
# was only checked for at the END of a line. Now an indent string is
# recognized regardless of where it occurs on a line so this is no
# longer used. Indent strings are always not case sensitive.


/Ignore Strings SOL = "#" "//"
# Lines which begin with those strings will be left un-indented
# when executing Format - ReIndent Selection.


# Brace Matching
/Open Brace Strings = "{" "(" "[" "<" "If" "For" "Select Case" "Else" "ElseIf"
/Close Brace Strings = "}" ")" "]" ">" "End If" "Next" "End Select" "End If" "ElseIf"

# Those strings extend the Match Brace command and Auto Brace Matching
# (in Syntax Highlighting Configuration).
# The open and close strings must be positionally matched in the lists.
# Defaults are "(" and ")". Case sensitivity of brace strings depends
# on keyword Nocase in the language definition line.


# Code Folding
/Open Fold Strings = "{" "If" "ElseIf" "Else" "Function" "Sub" "Select Case" "With"
/Close Fold Strings = "}" "ElseIf" "Else" "End If" "End Function" "End Sub" "End Select" "End With"

# Those strings are used to define the begin and end of the block of code
# which will be folded if requested by user. Defaults are "{" and "}".
# Case sensitivity of fold strings depends on keyword Nocase in
# the language definition line.


/Ignore Fold Strings = "// /" "Exit Function" "Exit Sub" "Declare Function"
# If one of those strings is found in the code, then the fold logic will
# ignore this line. There are no defaults. This definition is supported
# since UltraEdit v12.00 respectively UEStudio v5.10.


/Open Comment Fold Strings = "Region"
/Close Comment Fold Strings = "End Region"

# Those fold strings are recognized only in comments. No defaults.
# Normal open and close fold strings must be also specified, or the code
# folding engine is not enabled. Specify an open and close fold string
# which never occurs in the highlighted files when there are no normal
# open and close fold strings. Comment fold strings are supported since
# UltraEdit v12.00 respectively UEStudio v5.10. The string starting the
# line or block comment cannot be part of the open/close comment fold
# string. And the open/comment fold string must be surrounded by word
# delimiter characters or consist of delimiter characters.


# Marker Characters
/Marker Characters = "[]&;"
# Up to four pairs can be defined. You must add all the character
# pairs into any of the color groups to define its highlight color.
# Every text between a pair of characters in the same line is
# highlighted with the same color. Identical start and end characters
# are supported since UE v9.20 to highlight for example everything
# between @...@.


# Undocumented Strings
/Member String = "^([A-Za-z0-9_:.]+^)[ ^t^*&]+$S[ ^t^[^]A-Za-z0-9_]++[(-);,]"
/Variable String = "%[ ^t]++^([!-?~ ^t<>]+*[~a-z^p]^)$S[ ^t;,()^-]"

# Only the IDM developers know what they are for and how they must be
# defined for the UEStudio Classviewer / IntelliTips support in UEStudio.


# Color Groups built-in
# Normal Text
# Words that are not recognized. Displayed with normal text color (black).
# Comments
# Words that appear in a comment line or block comments. Displayed in green.
# Alternate Block Comments
# Words that appear in alternate block comments. Displayed in green.
# Strings
# Strings enclosed in characters defined by String Chars. Displayed in gray.
# You can add a string character to a color group to change the color.
# Numbers
# Words starting with a digit (0-9). Displayed in red.


# Color Group definitions
# /Cn"Color Group Name" STYLE_KEYWORD
# n is color code in range 1-8.
# "Color Group Name" is displayed in Configuration; up to 24 characters.
# (or only 18 characters in older version of UltraEdit). The color used to
# display each word list can be changed in Syntax Highlighting Configuration.
/C1"Color Group 1"
# Keywords for group 1, displayed in blue.
/C2"Color Group 2"
# Keywords for group 2, displayed in red.
/C3"Color Group 3"
# Keywords for group 3, displayed in orange.
/C4"Color Group 4"
# Keywords for group 4, displayed in green.
/C5"Color Group 5"
# Keywords for group 5, displayed in brown.
/C6"Color Group 6"
# Keywords for group 6, displayed in blue.
/C7"Color Group 7"
# Keywords for group 7, displayed in blue.
/C8"Color Group 8"
# Keywords for group 8, displayed in blue.
# Further color groups up to /C20 can be used since UE v17.00 and UES v11.00.

# Style keywords
STYLE_ATTRIBUTE STYLE_COMMAND STYLE_ELEMENT STYLE_EVENT STYLE_EXTENSION
STYLE_FUNCTION STYLE_IDENTIFIER STYLE_KEYWORD STYLE_METHOD STYLE_OPERATOR
STYLE_STATEMENT STYLE_TAG STYLE_VARIABLE

# Style keywords are part of the color group definition line.
# They identify color groups for IntelliTip support in UEStudio.
# They are optional.


# Keyword list
# Keyword list follows the line with color group definition.
# All keywords starting with the same letter can either be all written on
# a single line or they can be split in more successive lines (but in this
# case the lines must not be separated with blank line or a keyword starting
# with different letter). The first character of a keyword can be also a
# word delimiter with the exception of SPACE and TAB since UE v10.00.


// /keyword1 /keyword2
# Keywords beginning with / must be preceded by // .
# This is to differentiate such keywords from wordfile's own
# keywords like "/Delimiters"


** string1 string2 ...
# Matches all keywords starting with string1 or string2. Multiple such
# lines are possible in a color group. This is called sub string definition.
# The first character of a substring can be also a word delimiter with the
# exception of SPACE and TAB since UE v10.00.
# Are the maximum lengths (up to 18 characters) of the Language and Color Group still valid?

Yes and no. It is allowed to use more than 18 characters. But I don't know which version of UltraEdit was the first one which allowed longer descriptions and what is the real maximum. Even the standard wordfile installed with the installer contains longer language descriptions.

The problem is that too long descriptions are truncated in the configuration dialog drop down list because the length of the list box is limited. In the menu View - Views/Lists no truncation exists.

So it could be determined by a simple test how long the description could be for current version of UltraEdit and UEStudio with looking into the menu. But I personally avoid longer descriptions than 18 characters.



# Explanation of EnableMLS/DisableMLS is very weak

What explanation do you need? Either a language supports multi-line strings or it does not support it. Some Examples:

Valid for HTML is:
<img src="image.png" style="margin-left:50px;
margin-right:20px" alt="This is an image about ...">

Well, you should not break up the alt= attribute string because the line break will be shown by the browsers in any way.

Valid for 'C' is:
printf("<img src=\"image.png\" style=\"margin-left:50px;\
margin-right:20px\" alt=\"This is an image about ...\">");

'C' allows multi-line strings only when last character of a line in a multi-line string is the escape character '\'.

For many languages it is not allowed to have line breaks inside a string.

EnableMLS simply means that UltraEdit will not stop at the end of the line for searching a not escaped string char matching the starting string char. A single " in visible text body of an HTML file with EnableMLS set for HTML files can then result in highlighting a large block as string. (Solution is to use &quot; as recommended by the HTML standards).



# Undocumented Strings /Member String and /Variable String
# Are there any other undocumented features?


/Indent Strings SOL =
is missing because not documented anymore which maybe is happen by mistake. See "/Indent Strings SOL" - What is SOL? where I have posted the original documentation which is not present anymore in the help of current version 12.20b+1.

Also following can be specified:

Line Comment Preceding Chars Alt = [RegExp]
Line Comment Valid Columns Alt = [i-j,k]


But Line Comment Num Alt = ncc is not possible!

And if Block Commnent On Alt is defined but Block Comment Off Alt is not defined, then it works like a fourth set of line comment, but with the color for alternate block comments. So if a language has 2 different line comments, but only 1 block comment, it is sometimes better to use Block Commnent On Alt for the second line comment instead of Line Comment Alt


Wrong is also that File Extension = and File Names = can be used for the same language definition - see my 4th post at Syntax highlighting with downloaded wordfiles.txt for an explanation.

Also the number of file extensions (and probably also file names) is limited to 11 as once detected and posted at file extension limit.

And for the file extension the * can be used to highlight all files not specified at any language definition as described for example at:

syntax highlighting on a new file
Default syntax highlight for all files?

Very important is that the * must be the last file extension in the list of extensions for the current language definition. And since UltraEdit v12.20 and UEStudio v6.10 at Configuration - Editor Display - Syntax Highlighting - Highlight new files as a language can be specified to be used for new files and so the trick with the * as file extension must not be used anymore for new files. But it can be still used for automatically selecting a syntax highlighting for all already saved files with not known file extension or name.
# Are the maximum lengths (up to 18 characters) of the Language and Color Group still valid?
I have changed this to 24 chars, as this is the limit for truncating.

# Explanation of EnableMLS/DisableMLS is very weak
Oh, I was reading "Strings" but thinking about "Keyword:, so I confused myself.

# Undocumented Strings /Member String and /Variable String
No information about those?

/Indent Strings SOL =
I asked about this at IDM and added their reply to the template.


Line Comment Preceding Chars Alt = [RegExp]
Line Comment Valid Columns Alt = [i-j,k]

Block Commnent On Alt
Added. Thanks.


Wrong is also that File Extension File Names can be used for the same language definition
Added (but my point of view :wink: ).


Also the number of file extensions (and probably also file names) is limited to 11
Actually it is 19 extensions and 21 names at this moment.

And for the file extension the * can be used to highlight all files not specified at any language definition
Added.

Thank you.

Regards, Dalibor
Hi Dalibor,

you have to make some corrections on your template.

chrabros wrote: # Are the maximum lengths (up to 18 characters) of the Language and Color Group still valid?
I have changed this to 24 chars, as this is the limit for truncating.

This number is correct. It is confirmed and documented in help of UltraEdit v13.00. But creators of public wordfiles should try to not exceed the first limit of 18 characters or at least make sure the first 18 characters produce a unique description for a color group within a language definition. I don't know on which version the limit was increased. UltraEdit v11.20a also supports 24 characters.

chrabros wrote: Also the number of file extensions (and probably also file names) is limited to 11.
Actually it is 19 extensions and 21 names at this moment.

This is not the correct definition as I now know. See file extension limit where I have today posted the correct definition.

chrabros wrote: Block Comment On = string
Block Comment Off = string
# Strings that enclose the block comment.
# Up to five characters long; the first character might be space.

This is also not correct anymore. The limit for block comments (both, standard and alternate) is 19. Everything above will be ignored and only the first 19 characters are handled for highlighting block comments. I don't know on which version this limit was increased. 19 characters works also in v11.20a.

The limit for line comments (both, standard and alternate) is 5. Everything above will be ignored and only the first 5 characters are handled for highlighting line comments.
4 posts Page 1 of 1