Page 1 of 1

Colour highlight without spaces

Posted: Thu Oct 18, 2001 7:01 pm
by Haydn Langley
I wish to highlight key words that don't contain spaces. For example, -ldiXYZ should have the ldi highlighted as the syntax. Is this possible?
Thanks in advance

Re: Colour highlight without spaces

Posted: Fri Oct 19, 2001 4:02 am
by Murray Tyler
Are all your keywords of fixed length? (ie 3 characters in your example)

If so, then I think you can edit (or create) the syntax definition file for the file type in question (.syn file) and set KeyWordLength = 3, then provide a list of keywords in the keyword section.

See help -> contents -> reference information -> syntax definition files

Regards

Murray

Re: Colour highlight without spaces

Posted: Fri Oct 19, 2001 5:38 pm
by Haydn Langley
Thanks for the quick response - but unfortunately it does not work! There is no keyword KeyWordLength. In answer to the question, all the keywords do have a length of 3.

Any other suggestions out there?

Cheers
Haydn

Re: Colour highlight without spaces

Posted: Sat Oct 20, 2001 11:34 am
by Forrest
There is KeyWordLength= but it depends on this: HTML=1.

Which can be
C=1
HTML=1
LaTeX=1
TEXT=1

Your selection determines the options available.
But I wish I understood what's really going on with that. There is scant explanation in help an customer service won't answer.




HTML=1

[Syntax]
Namespace1 = 2
IgnoreCase = Yes
KeyWordLength =
BracketChars =
OperatorChars =
PreprocStart =
HexPrefix = #

Re: Colour highlight without spaces

Posted: Fri Oct 26, 2001 6:04 am
by Murray Tyler
You can use C=1 as well and it should work.

Try this example

; TextPad syntax definition
;

C=1

[Syntax]
Namespace1 = 6
IgnoreCase = Yes (or no, dependent on what you require)
KeyWordLength = 3
BracketChars = {[()]}
OperatorChars =
PreprocStart =
SyntaxStart =
SyntaxEnd =
HexPrefix =
CommentStart =
CommentEnd =
CommentStartAlt =
CommentEndAlt =
SingleComment =
SingleCommentCol =
SingleCommentAlt =
SingleCommentColAlt =
SingleCommentEsc =
StringsSpanLines = No
StringStart =
StringEnd =
StringAlt =
StringEsc =
CharStart =
CharEnd =
CharEsc =

[Keywords 1]
ldi
...Put the rest of your keywords here


Hope this helps

Murray

Re: Colour highlight without spaces

Posted: Tue Oct 30, 2001 9:49 pm
by Haydn Langley
Thanks for all the help - but I still have a problem! It seems as though my version of Text Pad will not accept KeyWordLength. Is there a version that does accept this?

Thanks again in advance.

Haydn

Re: Colour highlight without spaces

Posted: Wed Oct 31, 2001 3:24 am
by Forrest
It would be so nice if we could read somewhere what keywordlength even means! I was ready to do a presentation to the ATLAS programmers at my company, Lockheed-Martin, and try to convince them to buy many licenses. But I can't figure out the entire capabilities of TextPad. To a limited degree support answers questions but not completely.
It's a great program but for the life of me I can't fugure out that company!

Re: Colour highlight without spaces

Posted: Mon Nov 05, 2001 10:58 pm
by Murray Tyler
I'm using version 4.5, which seems to work OK.

Murray

Re: Colour highlight without spaces

Posted: Tue Nov 06, 2001 8:39 pm
by Haydn Langley
Thanks Murray - and thanks to all who reqponded to my query.

Yesterday I downloaded the latest version of TextPad (v4.5) and I now have my syntax highlighting working!

It is great to have a forum where there are honest answers to questions without the spam often found on web sites.

Haydn