For more basic information about using Color Coding, see Colors, Color Coding, and Symbol Colors.
To modify the color coding for VLX files, use one of the following methods:
Use the language-specific Color Coding options screen (see Language-Specific Color Coding Options).
Modify the vslick.vlx file.
Create a new VLX file.
The vslick.vlx file defines language-specific coloring support for the following languages:
Ada
Assembler
AWK
C
C++
CFScript
CICS
COBOL
dBASE
Delphi
Fortran
HTML
Java
Modula-2
Pascal
Perl
Python
REXX
Slick-CŪ
VHDL
Visual Basic .NET
To modify an existing language-specific coloring definition, complete the following steps:
Open vslick.vlx for editing.
Search for one of the section names: CPP, Java, Delphi, Pascal, AWK, REXX, Perl, HTML, Modula-2, AWK, COBOL, Python, CICS, Fortran, Visual Basic .NET, Ada, or Slick-CŪ.
Modify the definition. See below for information on the syntax of definitions.
Invoke the cload command from the command line. If the current buffer has a .vlx extension, it will be loaded. Otherwise you will be prompted to specify a file name. Specifyvslick.vlx including path as the file name.
To create a new lexer name (and thus a new section in the VLX file), first complete all of the preceding steps under Modifying the VLX File to Change a Color Definition, then complete the steps below.
From the main menu, click Window → SlickEdit Preferences → Languages, expand your language category and language, then select General.
If this lexer definition is for a new extension, create the extension with the New button. Otherwise, choose the appropriate extension.
Set the Lexer Name for the new lexer definition you created.
Turn on the Language Specific check box.
Click Update to commit the changes.
Files with a .vlx extension are text files that have a syntax similar to a .ini file. If the first non-blank character in a line is a semicolon, the line is considered a comment. Each definition of a language starts with a section name (the lexer name) enclosed in square brackets. Within each section are statements that look like name=value.
The table below shows the statements that can be used.
|
Statement |
Description |
|---|---|
|
case-sensitive= [Y | N] |
Defines the case sensitivity for the language. This statement must be the first or second statement within the section. |
|
idchars=start_id_chars after_id_chars |
Defines the characters that are the start of a valid identifier and additional valid characters that may follow. This statement must be the first or second statement within the section. You may use a dash (-) character to specify a range, for example, A-Z specifies uppercase letters. To specify a dash or backslash (\) character as a valid word character, place a backslash before the character. |
|
styles= style |
Defines zero or more styles. See Table of style Values below for a list of available styles. |
|
mlcomment= start_symbol end_symbol [nesting] [followedby idchars ] [ colorname ] |
Defines a multi-line comment. start_symbol and end_symbol define strings which start and end the comment. Specify nesting if the lexer should look for another occurrence of start_symbol when looking for the end comment symbol. The followedbyidchars is used to require certain characters to follow start_symbol. You can use a dash (-) character to specify a range, such as A-Z, which specifies uppercase letters. To specify a dash (-) or backslash (\) character as a valid word character, place a backslash before the character. followedbyis ignored when the html style is specified. Currently, start_symbol and end_symbol may not be valid identifiers. No more than four multi-line comments may be defined. colorname can be used to indicate that a different color such as keyword color be used instead of comment color when a match is found. colorname may be keywordcolor, numbercolor, stringcolor, commentcolor, ppkeywordcolor, linenumcolor, symbol1color, symbol2color, symbol3color, or symbol4color. |
|
mlcomment= start_symbol start_col [checkfirst|leading] end_symbol [lastchar] |
Defines a multi-line comment. This construct was designed to handle comments for the ATLAS language. start_symbol and end_symbol define strings which start and end the comment. start_symbol is only considered the start of a comment if it appears in column start_col. checkfirst specifies that the lexer should check if the line is a comment before determining the color coding of symbols in the line. When the checkfirst option is specified, start_symbol is limited to one character in length. leading specifies that symbol is considered a line comment only if it appears as the first non-blank character. Space or tab characters are considered blanks. Currently, end_symbol may not be a valid identifier. lastchar specifies that end_symbol must appear as the last character on a line to terminate the comment. No more than two multi-line comments may be defined. |
|
mlckeywords= [ keyword ] [ keyword ] ... |
Defines keywords for the last mlcomment statement. When one of these keywords follows the start_symbol defined for the last mlcomment statement, the keyword color is used to color the comment instead of comment color. Keywords do not have to be valid identifiers. This statement is useful for tag languages like HTML. See the HTML definition in the file |
|
keywordattrs= [ mlckeyword ] [ attribute ] [ attribute ] ... |
Defines attributes for the mlckeyword specified which belongs to the last mlcomment statement. Currently this statement only supports HTML syntax attributes and requires that the HTML style be specified. For example, keywordattrs=SCRIPT LANGUAGE SRC |
|
linecomment= [ symbol ] [ col | col + | start_col - end_col ] [checkfirst|leading] |
Defines a line comment. symbol defines the character(s) which start this line comment. If no column limits are specified, the remainder of the line is considered a comment regardless of where symbol appears. A plus sign (+) after a column specifies an unlimited end_col. checkfirst specifies that the lexer should check if the line is a comment before determining the color coding of symbols in the line. When the checkfirst option is specified, symbol is limited to one character in length. If symbol is not specified, all characters will be ignored at or after the column specified (ex. linecoment=73+). This is useful for Fortran which requires that all characters at or after column 73 be ignored. leading specifies that symbol is considered a line comment only if it appears as the first non-blank character. Space or tab characters are considered blanks. |
|
keywords= [ keyword ] [ keyword ] ... |
Defines words that should be displayed in keyword color. Keywords do not have to be valid identifiers. |
|
cskeywords= [ keyword ] [ keyword ] ... |
(Case-sensitive keywords) Defines words that should be displayed in keyword color only if found in the case specified. This statement should only be used for languages such as HTML which are case insensitive except for a few words. For other languages, use the case-sensitive and keywords statements. Keywords do not have to be valid identifiers. |
|
ppkeywords= [ keyword ] [ keyword ] ... |
Defines words that should be displayed in preprocessor color. The first character of a preprocessor keyword must not be a valid identifier. Preprocessing keywords must appear as the first non-blank symbol in the line. |
|
symbol1= [ keyword ] [ keyword ] ... |
Defines words that should be displayed in symbol1 color. Keywords do not have to be valid identifiers. |
|
symbol2= [ keyword ] [ keyword ] ... |
Defines words that should be displayed in symbol2 color. Keywords do not have to be valid identifiers. |
|
symbol3= [ keyword ] [ keyword ] ... |
Defines words that should be displayed in symbol3 color. Keywords do not have to be valid identifiers. |
|
symbol4= [ keyword ] [ keyword ] ... |
Defines words that should be displayed in symbol4 color. Keywords do not have to be valid identifiers. |
The table below describes the style values that can be used:
|
Value of style |
Description |
|---|---|
|
linenum |
Line numbers may be found as the first non-blank symbol of a line like BASIC. |
|
dqbackslash |
Color double-quoted strings. Characters following a backslash in a double-quoted string are included in the string (like C). |
|
dqbackslashml |
Color double-quoted strings. If a double-quoted string ends in a backslash, it continues the string to the next line (like C). |
|
dqmultiline |
Color double-quoted strings. String may span multiple lines. |
|
dqdoubles |
Color double-quoted strings. Two double quotes represent one double quote. |
|
dqterminate |
Do not color-code a double-quoted string until the string is terminated. This style does not support dqmultiline or dqbackslashml. |
|
dqlen1 |
Color double-quoted strings. Double-quoted strings contain exactly one character. |
|
sqbackslash |
Color single-quoted strings. Characters following a backslash in a single-quoted string are included in the string (like C). |
|
sqbackslashml |
Color single-quoted strings. If a double-quoted string ends in a backslash, it continues the string to the next line. |
|
sqmultiline |
Color single-quoted strings. String may span multiple lines. |
|
sqdoubles |
Color single-quoted strings. Two consecutive single quotes represent one single quote (like Pascal). |
|
sqterminate |
Do not color-code a single-quoted string until the string is terminated. This style does not support sqmultiline or sqbackslashml. |
|
sqlen1 |
Single-quoted strings contain exactly one character (like Ada). |
|
amphhex |
Hexadecimal numbers are of the form &Hdddd (like BASIC). |
|
ampooct |
Octal numbers are of the form &Odddd (like BASIC). |
|
hexh |
Hexadecimal numbers are of the form ddddH (like Intel Assembler). |
|
octo |
Octal numbers are of the form ddddO (like Intel Assembler). |
|
octq |
Octal numbers are of the form ddddQ (like Intel Assembler). |
|
poundbase |
Based numbers are of the form #base#number#exponent (like Ada). |
|
underlineint |
Numbers may have underlines between the numbers (like Ada). |
|
xhex |
Hexadecimal numbers are of the form0xhhhh (like C). |
|
nonumbers |
Do not color-code numbers. This style is useful for tag languages like HTML. Using this style with other number color-coding styles will produce unpredictable results. |
|
rexxhex |
Hexadecimal strings are followed by an upper or lowercase letter X. For example, '414141'X or 414141X are REXX-style hexadecimal strings that are both equivalent to the string AAA. |
|
packageimport |
Language has Java syntax package and import statement where non-quoted file name follows package and import keyword. |
|
idparenfunction |
An identifier followed by an open parenthesis indicates a function (like C++ and Java). |
|
html |
Enables HTML syntax embedded languages and attribute coloring. |
|
backslashescapechars |
Backslash escapes the character that follows. |
|
heredocument |
Enables support for Heredocuments. Note that if you prefix the terminator with one of the lexer names, you will get embedded language color-coding. |
|
perl |
Adds support for Perl format statement and some other Perl-specific changes. |
|
tcl |
Special support for TCL language color-coding. |
|
bquote |
Perl- and Linux Shell-style backquote (subshell). |
|
model204 |
Special support for Model 204 language. |
|
cics |
Special support for CICS embedded in COBOL. |
|
python |
Special support for Python. |