Page 1 of 1

Perl Document Class with .pl extension

Posted: Tue May 14, 2002 1:31 am
by Matthew Lock
Hello,
I work on Perl scripts hosted on Unix servers, and do my editing in Textpad via FTP.
I would like the Perl document class to detect Perl scripts without a .pl extension, as most Unix scripts have no extension.

Would it be possible for Textpad to be able to read the "shebang" that most Unix scripts use on the first line of the script. For example Perl uses:
#!/usr/bin/perl on the first line.

I'm sure it would also help Python and other Unix script users too.

Re: Perl Document Class with .pl extension

Posted: Wed May 15, 2002 2:05 pm
by Roy Beatty
Sorry I can only offer kludges

One solution *would* have been to specify in TextPad's shortcut target property, a command line option to specify a syntax file to apply. Unfortunately, I was not able to find such a beastie in TextPad Help. Go to http://www.textpad.com/support/index.html to enter this as an enhancement request.

Meanwhile, you'd have to temporarily rename the copy of the script you are editting to <whatever>.pl, and undo the rename after TextPad closes the file.

HTH,
Roy

Re: Perl Document Class with .pl extension

Posted: Mon May 20, 2002 8:09 am
by Matthew Lock
I have entered the ability for the document class to be determined from the first line of the file, as a feature enhancement.

Re: Perl Document Class with .pl extension

Posted: Mon May 20, 2002 11:25 am
by Andreas
No need for renaming.

View - Document Properties - Syntax Tab

select whatever syn-File you want.

If you keep your files in a Textpad Workspace, this setting will be remembered the next time you open the workspace.