Page 1 of 1

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

Posted: Thu Jun 12, 2003 4:11 pm
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

Posted: Tue Jun 17, 2003 9:34 am
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

Posted: Tue Jun 17, 2003 1:01 pm
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

Posted: Wed Jun 18, 2003 9:34 am
by bhh
You are allowed to fill in more than 1 InitialKeyWordChars
or InitKeyWordChars.
Say something like

InitKeyWordChars=a-z@