Highlighting Question

General questions about using TextPad

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

Post Reply
rman666
Posts: 4
Joined: Fri Jun 04, 2004 4:08 am
Location: milwaukee, wi
Contact:

Highlighting Question

Post by rman666 »

Hi. I'm a long time TextPad user. I need help defining a *.syn file for proper highlighting. The files are to-do lists in TaskPaper format. TaskPaper is a to-do list manager for OSX (see http://hogbaysoftware.com/products/taskpaper). Basically, I need:

1. To highlight (or color, etc.) any line ending with a COLON (":")

2. To highlight any word starting with the AT sign ("@")

3. To highlight any line starting with a MINUS sign ("-"). This rule should override rule #2.

Ideally the use of regular expressions would be supported in syntax files, but this does not appear to be the case.

Can TextPad do this?

Any ideas will be appreciated. Thanks.
User avatar
Bob Hansen
Posts: 1517
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

You are correct, this is NOT presently the case. Currently, can only handle complete words that are defined, no wild cards allowed.
Hope this was helpful.............good luck,
Bob
Saxxon
Posts: 1
Joined: Thu Feb 24, 2011 10:47 am

Post by Saxxon »

you might be able to solve point 3

as long as the minus is not used in operator characters, you could define it as the start of single line comments.

for your second point i need an idea as well. it would be possible, when "@" would be the start for characters or strings, and a space would mark the end. unfortunately, there is no chance to tell Textpad, that your string or character ends at a blank space.
User avatar
SteveH
Posts: 327
Joined: Thu Apr 03, 2003 11:37 am
Location: Edinburgh, Scotland
Contact:

Post by SteveH »

You mean this kind of idea?

Image

This is something I've previously tried to do in TextPad but I don't think it's possible with the way syntax files are currently configured. The example above uses a competing product which won't be named that supports regular expression based syntax definition files. I put together a syntax file to do this and can supply it if it would be useful.

The other option if you want to work with TaskPaper file type on Windows is to use Jordan Sherer's TodoPaper application.
This uses a very similar file structure to TaskPaper and is effectively a TaskPaper clone for Windows. The main difference is that TodoPaper doesn't currently handle the 'new' indented task format that was introduced when the iPhone version of TaskPaper was released. Here's that same file opened in TodoPaper.

Image

Hope this helps.
Running TextPad 5.4 on Windows XP SP3 and on OS X 10.7 under VMWare or Crossover.
Post Reply