Meaning of C, HTML, LaTeX & TEXT in Syntax Files

Usage tips, posted by users. No questions here please.

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
User avatar
bbadmin
Site Admin
Posts: 878
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Meaning of C, HTML, LaTeX & TEXT in Syntax Files

Post by bbadmin »

Syntax definition files must start with TEXT=1, C=1, HTML=1, LaTeX=1. This tip explains what effect each of those has.

TEXT=1 means that only URLs will be highlighted. All sections of the syntax definition file are ignored, so do not use this type.

C=1 means that full syntax highlighting is available for languages which broadly conform to C syntax. All keywords are in a single namespace, so duplicates are not allowed.

HTML=1 means that full syntax highlighting is available for languages which broadly conform to HTML syntax. Keywords are in two namespaces, with tags in one and their attributes in the other. The Namespace1 parameter controls how many of the six [Keyword] sections are in the first namespace. Having two namespaces allows keywords such as TITLE, which can be both a tag and an attribute, to be colored according to context.

LaTeX=1 is a variant of C=1, to take account of some peculiarities of LaTeX syntax.

Keith MacDonald
Helios Software Solutions
mattmc3
Posts: 3
Joined: Tue Dec 13, 2005 3:50 pm

PERL=1

Post by mattmc3 »

You've left out PERL=1. This may be too old a tip to have accounted for it. What specifically does PERL=1 take into account?
Post Reply