Highlighting text files in 5.2

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
Fitzs46041
Posts: 3
Joined: Wed Jun 18, 2008 7:06 pm

Highlighting text files in 5.2

Post by Fitzs46041 »

I am trying to turn on high lighting in text fles and not having much luck. Added is the top part of the syntax file and I would like someone to point out what I am doing wrong.

; TextPad syntax definitions for PCGen

C=1

[Syntax]
; Namespace1 changed from 4 to 6
Namespace1 = 6
IgnoreCase = No
KeyWordLength = 0
BracketChars = [{]}
OperatorChars = */+-=!
PreprocStart =
; HexPrefix =
SyntaxStart =
SyntaxEnd =
CommentStart =
CommentEnd =
SingleComment = #
SingleCommentCol =
SingleCommentAlt =
SingleCommentColAlt =
SingleCommentEsc =
StringsSpanLines = No
StringStart = "
StringEnd = "
StringAlt =
StringEsc =
CharStart =
CharEnd =
CharEsc =

[Keywords 1]
; All tags *.lst, *.pcc
ABB
ABILITIES
ABILITY
ABILITYCATEGORY
ABILITYLIST
ABILITYPOOL
ACCHECK
ACHECK
ACNAME
ACABBREV
ACTYPE
ACVALUE
ADD
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post by talleyrand »

Are you setting this one time or for a document class? The former is only active for the current document, the latter will apply to all documents in that class.

Be sure to read about Saving Preferences before going any further.

Make sure that the syntax file you are using is located in the appropriate folder. Configure, Preferences, Folders. For me, it's located at C:\Documents and Settings\talleyrand\Application Data\Helios\TextPad\5.0

Assuming you are setting this at the class level and you have already created the class.

Configure, Preferences, Document Classes (expand your desired class) and select Syntax. Check Enable syntax higlighting and select your syntax menu in the drop down menu. Click ok.

If you have any instances of that class currently open, the syntax file changes will not be automagically refreshed so you will need to reopen them or apply the syntax on a per file basis.

If this doesn't correct the issue, please provide more information so that we can better diagnose the problem.
I choose to fight with a sack of angry cats.
Fitzs46041
Posts: 3
Joined: Wed Jun 18, 2008 7:06 pm

Post by Fitzs46041 »

talleyrand wrote:Are you setting this one time or for a document class? The former is only active for the current document, the latter will apply to all documents in that class.

Be sure to read about Saving Preferences before going any further..
It is for a class, and read the messages prompted. Have set up the Preferences.
talleyrand wrote:Make sure that the syntax file you are using is located in the appropriate folder. Configure, Preferences, Folders. For me, it's located at C:\Documents and Settings\talleyrand\Application Data\Helios\TextPad\5.0.
I hate Vista (sp1) with a new passion, another program that it hijacked the directory structure. Redirected, Restarted, no effect.
talleyrand wrote:Assuming you are setting this at the class level and you have already created the class.

Configure, Preferences, Document Classes (expand your desired class) and select Syntax. Check Enable syntax higlighting and select your syntax menu in the drop down menu. Click ok.

If you have any instances of that class currently open, the syntax file changes will not be automagically refreshed so you will need to reopen them or apply the syntax on a per file basis.

If this doesn't correct the issue, please provide more information so that we can better diagnose the problem.
Tried to route it out of where the Vista directed things, but nothing either. Going to try a reboot and see if it fixes things.
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post by talleyrand »

Is this syntax file listed as an option for you? Is that the problem or is your problem that it's not highlighting things correctly or is there a different issue that you are encountering? If it's not highlighting as expected, look at your document class and validate that the extension mapped to it is the same as what is being opened and that the syntax associated with it is the intended one.
I choose to fight with a sack of angry cats.
Fitzs46041
Posts: 3
Joined: Wed Jun 18, 2008 7:06 pm

Post by Fitzs46041 »

talleyrand wrote:Is this syntax file listed as an option for you? Is that the problem or is your problem that it's not highlighting things correctly or is there a different issue that you are encountering? If it's not highlighting as expected, look at your document class and validate that the extension mapped to it is the same as what is being opened and that the syntax associated with it is the intended one.
I'm not sure what you mean by syntax option. But its not highlighting correctly. It highlights the web addresses, but not the words listed in Keyword 1-6, unless they are embedded in the text some where. The Keywords are what I need to get to highlight.

The class has the correct *.pcc and *.lst extensions listed as far as I can tell. I put them in the first page of the class group, in the Associated Files page, the File Name Filter page.

An example of the files I am working on is:

Wand (Ray of Enfeeblement/heightened to 4th-level spell)<TAB>
OUTPUTNAME:Wand of [NAME]<TAB>
TYPE:Magic.Wand<TAB>
WT:.0625<TAB>
BASEITEM:Wand<TAB>
EQMOD:SPL_CHRG|SPELLNAME[Ray of Enfeeblement]SPELLLEVEL[4]CASTERLEVEL[7]CHARGES[16]<TAB>
SOURCEPAGE:LSJ - Tooth and Claw

It should be highlighting all of the capatilized words, currently only the [NAME] is being highlighted in the first line.
Post Reply