Urgently needed: a SAMPLE SYN FILE for NON-programming lang

General questions about using TextPad

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

Post Reply
User avatar
no.cache
Posts: 165
Joined: Thu May 15, 2003 2:52 pm

Urgently needed: a SAMPLE SYN FILE for NON-programming lang

Post by no.cache »

Hi, there are some of us who use Textpad for non-programming purposes, and to that end I am disappointed that Helios has not provided a layperson's example for those text-type files needing unique words highlighted that have nothing whatsoever to do with programming.

I have created a class of document labeled ~.OCR — as well as a syntax file called DATABASE.SYN (correct directory assigned, I checked) —expressly to be able to see select words in a large OCR'd text file highlighted to ease my editing.

This isn't a C file.
This isn't Java.
This isn't HTML.

This is a text file that, were it not for the fact that Textpad requires me to assign it its own class, would (and should) be a file with the extension ~.txt.

Because none of the examples provided apply to a basic text file, I cannot determine how the DATABASE.SYN file should read. Here is what I have produced; honestly, it shouldn't be beneath Helios to create a sample SYN file for the rest of us tsk. :oops: There are only two "terms" I need to hilight (@@ and DCONTACTED); here it is; what's wrong:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TEXT=1

[Syntax]
Namespace1 = 6
IgnoreCase = Yes
KeyWordLength =
BracketChars =
OperatorChars =
PreprocStart =
SyntaxStart =
SyntaxEnd =
CommentStart =
CommentEnd =
CommentStartAlt =
CommentEndAlt =
SingleComment =
SingleCommentCol =
SingleCommentAlt =
SingleCommentColAlt =
StringStart =
StringEnd =
StringAlt =
StringEsc =
CharStart =
CharEnd =
CharEsc =

[Keywords 1]
@@

[Keywords 2]
DCONTACTED
bhh
Posts: 7
Joined: Wed Apr 16, 2003 6:20 pm
Location: Leidschendam, Netherlands

Post by bhh »

If you put TEXT=1 in your syntac file TextPad will ignore all keywords.
Look in the text.syn file.
You can find it in the TextPad system folder.

Use C=1 instead. Don't start complaining please.

Then fill in the

InitKeyWordChars=

and the

KeyWordChars=

lines.

Save the file. Restart.

More information can be found in the help file: Reference Information, Syntax Definition Files.

Berend
User avatar
no.cache
Posts: 165
Joined: Thu May 15, 2003 2:52 pm

Post by no.cache »

1. I am using C=1
2. I have more than one "Initial Keyword" Characters

See my most recent post.

Skye
Image
bhh
Posts: 7
Joined: Wed Apr 16, 2003 6:20 pm
Location: Leidschendam, Netherlands

Post by bhh »

You are allowed to fill in more than 1 InitialKeyWordChars
or InitKeyWordChars.
Say something like

InitKeyWordChars=a-z@
Post Reply