How to create a *.SYN file?

General questions about using TextPad

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

Post Reply
Francis Fahrer

How to create a *.SYN file?

Post by Francis Fahrer »

Hi all,

1. How to create a *.SYN file? How do I specify the syntax colors, type of fonts, etc.? I have looked at a couple of *.SYN files, but I no clue as to how to assign a color to a particular syntax.
For example, if I wanted the JSP comments --> //, /* */, <%-- -->, <!--, --> to have the same color, how do I specify it? whew...

2. How do I ensure that when I right click on a shortcut to a cmd file, I have a right context menu item for "Textpad?"

Maybe there's a tutorial somewhere on this site or one of the discussion threads has this particular topics?

Thanks a bil,
Francis
Andreas

Re: How to create a *.SYN file?

Post by Andreas »

1.
the colors are not assigned in the .syn file, but in the document class (Configure/Preferences, under Document Classes select the class for which you want to set the colors, then select colors)

For more info about syn-files, go to Help/Help Topics, select "Content", then select Reference Information->Syntax Definition Files


2.
Configure/Preferences, select "General", activate Checkbox "Context Menu" in the "Put shortcuts to Textpad on" box
Stephan

Re: How to create a *.SYN file?

Post by Stephan »

Check your help file (Reference information / Syntax Definition Files)

For creating a nsy file I'd recommend TextPad. ;)
In the download part of the site there are lots and lots of syntax definition files to be found. You will likely find what you''re looking for over there.
If not there might well be a definition of a similar language that you can use to tailor your own. (I did with the ruby.syn)

The colours are set with TextPad. Once you chose a definition file and have a document class defined click
[Configure | Preferences | Document classes | <your class name goes here> | colors] and choose the colours.

Don't ask we were the colour settings go - I'm afraid they end up somewhere in the registry.

BTW, what I'd really like to see is the colour settings being defined in the syn file. So we'd be able to transfer the preferred colours easily to another computer.

If I got it right, try [Configure | Preferences | General] and check the "Context menu" box in the "Put shortcuts to TextPad on" panel.

Hope that helpewd,

Stephan
Post Reply