Gnu Makefiles in TextPad...

General questions about using TextPad

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

Post Reply
Ian Evans

Gnu Makefiles in TextPad...

Post by Ian Evans »

I'm trying to create a document class so I can use syntax highlighting in Gnu Makefiles. I've downloaded gnumake.syn, and have created a new document class, but I can't figure out how to make the extensions recognize a Makefile.

The problem appears to be the Makefile having no extension. "Makefile" on its own does not highlight, nor does "*Makefile", "*Makefile*", etc.

Is there any way to associate files with no extension to a document class?

-ian
Andreas

Re: Gnu Makefiles in TextPad...

Post by Andreas »

The problem might be the order in which the classes are checked (bottom to top).
I just tried it, if I call the document class "Makefile" it gets "Text" highlighting, but if I call it "ZMakefile" I get Makefile highlighting.
(My Text class recognizes among others *.)

HTH,
Andreas
Ian Evans

Re: Gnu Makefiles in TextPad...

Post by Ian Evans »

Ok, that worked. Thanks.

Perhaps a good feature for the next version of TP would be the ability to re-order the document classes without having to rename them to appear alphabetically. Something like up/down arrows to change the order in which classes are checked.
moderator

Re: Gnu Makefiles in TextPad...

Post by moderator »

Or you could just delete the *. in "Files in class Text" (Configure, Preferences, Document Classes, Text).

Regards

Heidi-Marie
Andreas

Re: Gnu Makefiles in TextPad...

Post by Andreas »

Btw, is there an easy way to change a document class name?
The only way I found is close all Textpads, change the name in registry and restart Textpad.

Andreas
Andreas

Re: Gnu Makefiles in TextPad...

Post by Andreas »

Just found it myself - it works when no files are open.
In Configure/Preferences, select document classes in tree, then select a class in the list and click on it again, type new name.
Andreas
Post Reply