UltraEdit syntax highlighting and code folding

There have been several enhancements added to syntax highlighting in more recent versions of UltraEdit. We have summarized the most important changes below for your convenience.

Please note: If you're using our default wordfiles you shouldn't need to make any changes for these items as the wordfiles we provide do work as described below.

Brace Matching

UltraEdit has defaults for Open and Close Brace Strings for many languages. If no strings are specified in the wordfile, the defaults are used. Otherwise, the specified strings are used for brace matching.

Note: In order for your braces to match properly, the closing brace definition in the wordfile MUST be in the same position as the opening brace definition, in the list of brace strings.

Most users will not have to make any changes here because the default wordfiles do include the items above.

Spell Checking (Spell check as you type)

By default UltraEdit and UEStudio 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 the following to the language definition line (e.g., /L3"HTML" ...) of the wordfile:

EnableSpellasYouType

If you wish to enable "spell check as you type" for a certain language, you will need to add the above string to your wordfile. It is case-sensitive. The appropriate spell check option must also be selected in the advanced configuration to support this.

Multi-Language Highlighting

UltraEdit has improved syntax highlighting and it now supports multiple languages within a single file. This is specifically for HTML type files. To help facilitate this, additional language indicators have been added to the default wordfile and most users shouldn't have to make any changes here. If you're not using the default wordfile these items should be added to the wordfile.txt file.

Example:
If an HTML file includes PHP then the syntax highlighting section must exist in the main wordfile and the PHP section should include in the definition line: PHP_LANG.

So, the default HTML language section has the HTML_LANG string:

/L3"HTML" Nocase Noquote HTML_LANG ...

and the PHP language section includes the PHP_LANG string:

/L8"PHP" Nocase PHP_LANG ...

This has been changed, as the default PHP wordfile used to include the HTML_LANG string:

/L8"PHP" Nocase HTML_LANG ...

Currently, UltraEdit uses the language markers shown below to correctly highlight multiple languages within a file. In the future UltraEdit may make further use of these languages markers in the wordfile, so if you are creating or editing a wordfile that contains any of the language types listed below the appropriate language string should be included.

Language String

File Type

C_LANG

C/C++

COBOL_LANG

Cobol

FORTRAN_LANG

Fortran

PASCAL_LANG

Pascal

PERL_LANG

Perl

PLB_LANG

Plb

VB_LANG

Visual Basic

VBSCRIPT_LANG

Vb Script

ASP_LANG

ASP

CSHARP_LANG

C Sharp

CSS_LANG

CSS

LATEX_LANG

TeX / LaTeX

HTML_LANG

HTML

JAVA_LANG

Java

JSCRIPT_LANG

Javascript

ECMA_LANG

Ecma / Ecmascript

PHP_LANG

PHP

PYTHON_LANG

Python

XML_LANG

XML

MATLAB_LANG

Matlab script

MASM_LANG

Microsoft Assembler

AASM_LANG

AT&T Assembler

NASM_LANG

Netwide Assembler

NOTE: If your wordfile contains multiple occurrences of the HTML_LANG language marker, this must be corrected or some languages may not highlight correctly. UltraEdit allows only one instance of a language marker (i.e., C_LANG, COBOL_LANG, HTML_LANG) in a wordfile.

The following file extensions were moved to the HTML section of the default wordfile: php, asp, and jsp. This was done to facilitate correct HTML highlighting at the outer language level of the file even when no language tag is specified within the file. All php, asp, and jsp sections of the files are highlighted correctly based on language start and end tags ( and ?> for example), however a "View As" will show the file as HTML type.