Is it possible?

General questions about using TextPad

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

Post Reply
Richard Coombes

Is it possible?

Post by Richard Coombes »

I'm writing a syntax definition file and want to know if it possible to highlight the word directly after an @ symbol. The word after it can be anything so a list of keywords will not suffice. Any suggestions?

Cheers

R. Coombes
Aaron Bittner

Yes, it's possible.

Post by Aaron Bittner »

Have the macro search for the @, begin selection, search for the next space, back up one character (left arrow), end selection.

Assuming, of course, that a space follows the word you want to select.

-Aaron
Randall McDougall

Re: Yes, it's possible.

Post by Randall McDougall »

He's talking about syntax highliting, not selection ... though a similar (admitted kluge) could apply -- if the "keyword" always ended with a space (or some other specific char), you could define "@" as a string starter and " " as the terminater ... then you could colour those items as "String" ... and use "Character" and/or alt-string for "Real" strings ...
Post Reply