Apply adhoc class to open file

General questions about using TextPad

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

Post Reply
rkrite
Posts: 18
Joined: Wed Oct 08, 2003 10:38 pm
Location: Sydney

Apply adhoc class to open file

Post by rkrite »

Hi,

Is there a way that I am able to apply a class to an open file that is currently in a different (or no) class?

EG.
* I have set up a class for "Shell Scripts" (*.ksh, *.sh)
* I have set up a class for "SQL Scripts" (*.sql)
* I have a few files in my dev repo that do not have file extensions (eg. MySQLScript, MyShellScript)
* When I open MyShellScript file, I would like the ability to select and apply the "Shell Scripts" class to this particular open file in an adhoc manner so I can have this open file make use of things like Syntax Highlight, desired tabs, etc.
* In the same session, I would also like to apply the "SQL Scripts" to another file MySQLScript.

Is there a way to do this?

Thanks
rkrite
Posts: 18
Joined: Wed Oct 08, 2003 10:38 pm
Location: Sydney

Re: Apply adhoc class to open file

Post by rkrite »

rkrite wrote:Is there a way that I am able to apply a class to an open file that is currently in a different (or no) class?
BTW, I am using Textpad v 5.2.0.
Thanks
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

I can't remember if it worked in such a historic version as 5.2.0 - in current versions you can press Alt-Return, switch to syntax tab, then apply whatever syntax you want.

Not exactly the class assignment you want, but might be close enough.

In same dialog, you can also adapt tabulation and so on, but not by choosing a different class, only by manually adapting each setting.
rkrite
Posts: 18
Joined: Wed Oct 08, 2003 10:38 pm
Location: Sydney

Post by rkrite »

MudGuard wrote: Not exactly the class assignment you want, but might be close enough.
Thanks MudGuard. Indeed, this is exactly what I was after.
... And yes, it is working in 5.2.0 :D
Thanks very much.
Post Reply