Document Class File Specifiers
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Document Class File Specifiers
I have a document class for makefiles, specified to makefile, makefile.*, and *.mak. Makefile.mak gets syntax highlighting, but Makefile does not. It would be handy if more general file specifiers than *.mak worked.
Also, I am unable to find anywhere which document class is currently in effect, or any way to force the issue should I choose, and both of those would be useful as well.
Thank you.
Also, I am unable to find anywhere which document class is currently in effect, or any way to force the issue should I choose, and both of those would be useful as well.
Thank you.
Try
Code: Select all
Makefile.
Yes, the Makefile document class I have defines file specifiers for Makefile and *.mak. "AnyFileName.mak" is picked up, "Makefile" is not.
I'm using gnumake.syn, but of course the file specification is in under
"Configure/Preferences/Document Classes". The "how to customize document properties" help page indicates that filenames should work, but I can't get them to, so perhaps I should file this as a bug report...?
I have (since this morning) realized that I can get to document properties by right-clicking on the tab, and going to "syntax".
Thank you, anyone, for any light you can shine here.
I'm using gnumake.syn, but of course the file specification is in under
"Configure/Preferences/Document Classes". The "how to customize document properties" help page indicates that filenames should work, but I can't get them to, so perhaps I should file this as a bug report...?
I have (since this morning) realized that I can get to document properties by right-clicking on the tab, and going to "syntax".
Thank you, anyone, for any light you can shine here.
not but
Code: Select all
Makefile
Code: Select all
Makefile.
I assume you're talking about the "files in class" column in the "Document Classes" branch of the Preferences dialog. Tried specifying "Makefile." instead of "Makefile". Made no difference.
The file specifiers I am using are Makefile.*, *.mak, Makefile., and *.mkf.
A file named "Makefile.lkj", for instance, gets tagged as a makefile, and highlighting is turned on, whereas "Makefile" still does not.
Thank you, though.
The file specifiers I am using are Makefile.*, *.mak, Makefile., and *.mkf.
A file named "Makefile.lkj", for instance, gets tagged as a makefile, and highlighting is turned on, whereas "Makefile" still does not.
Thank you, though.
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
TextPad sorts the document classes alphabetically, and searches them backwards for a wildcard expression that matches the name of a file being opened. So if, for example, you have a class called Text, and it includes the file spec "*.", and if you have a class called Makefile, and it includes the file spec "Makefile", then if you open a file called Makefile, TextPad will match it with the file spec in the Text class and never notice that it also matches the file spec in the Makefile class.
Solution: put the makefile class near or at the end of the list, for example, by naming it ~Makefile.
Solution: put the makefile class near or at the end of the list, for example, by naming it ~Makefile.
Thank you! That makes perfect sense, but I still can't get it to work. I defined "zzMakefile", still uses gnumake.syn, files in class still Makefile., Makefile.*, *.mak, *.mkf. Makefile.mak still gets highlit, Makefile does not.
Changed zzMakefile class to only pick up Makefile., Makefile class to pick up Makefile.*, *.mak, *.mkf. No help.
How, just out of curiousity, do I *delete* document classes?
Changed zzMakefile class to only pick up Makefile., Makefile class to pick up Makefile.*, *.mak, *.mkf. No help.
How, just out of curiousity, do I *delete* document classes?
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Take the dot off the end of the file spec: not
Makefile.
but
Makefile
.
There is a note in Configure | Preferences | Document Classes:
Makefile.
but
Makefile
.
There is a note in Configure | Preferences | Document Classes:
Make sure that no other instances of TextPad are open either, so that you don't overwrite the new settings with the previous ones.Note that this list of classes can only be modified when no documents are open.
MudGuard (several posts ago) said *to* use the dot. I have tried both and not seen any difference.
I have also closed and re-opened all instances of textpad and the document classes are as I have set them.
Let's face it, setting a filename without extension as a class member in a document class just plain does not work.
I thank you all for your help.
Oh, and if anyone is curious, as far as I can tell the only way to remove junk document classes is to go to
HKCU\Software\Helios\TextPad 5\Document Classes\
in the registry, and manually remove the ones you don't like.
Thanks again.
I have also closed and re-opened all instances of textpad and the document classes are as I have set them.
Let's face it, setting a filename without extension as a class member in a document class just plain does not work.
I thank you all for your help.
Oh, and if anyone is curious, as far as I can tell the only way to remove junk document classes is to go to
HKCU\Software\Helios\TextPad 5\Document Classes\
in the registry, and manually remove the ones you don't like.
Thanks again.
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
It does here.tasbury wrote:Let's face it, setting a filename without extension as a class member in a document class just plain does not work.
It works here as I described above.tasbury wrote:as far as I can tell the only way to remove junk document classes is to go to
HKCU\Software\Helios\TextPad 5\Document Classes\
in the registry, and manually remove the ones you don't like.