Page 1 of 1

Highlighting Question

Posted: Wed Mar 19, 2008 6:50 pm
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.

Posted: Wed Mar 19, 2008 10:20 pm
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.

Posted: Thu Feb 24, 2011 10:57 am
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.

Posted: Thu Feb 24, 2011 12:46 pm
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.