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
Colour highlight without spaces
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Re: Colour highlight without spaces
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
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
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
Any other suggestions out there?
Cheers
Haydn
Re: Colour highlight without spaces
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 = #
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
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
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
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
Thanks again in advance.
Haydn
Re: Colour highlight without spaces
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!
It's a great program but for the life of me I can't fugure out that company!
Re: Colour highlight without spaces
I'm using version 4.5, which seems to work OK.
Murray
Murray
Re: Colour highlight without spaces
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
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