Discussion:
Attaching a PHP Check Syntax Script
Carlton Gibson
2008-03-29 19:02:10 UTC
Permalink
Hi all,

I tried this message on the BBEdit-Scripting list but it never seemed
to arrive (in fact there don't seem to be any recent messages there
at all... is it still live? )

Anyhows...
Date: 29 March 2008 16:47:43 GMT
Subject: Attaching a PHP Check Syntax Script
Hi all,
BBEdit's #! Menu has a rather useful Check Syntax option.
Unfortunately this is not active for PHP.
PHP however has its own linter which can be accessed via a command
line option. I'm just in the process of wrapping this in an
AppleScript.
What I'd like to do is to attach this script to #! > Check Syntax.
What I'm not sure about is how to convince BBEdit that it wants to
make this menu option active for PHP scripts. I'm hoping that
somebody will be able to steer me in the right direction?
Thanks in advance,
Carlton
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
Jim Correia
2008-03-29 19:23:46 UTC
Permalink
Post by Carlton Gibson
I tried this message on the BBEdit-Scripting list but it never
seemed to arrive (in fact there don't seem to be any recent messages
there at all... is it still live? )
That list is still alive.
Post by Carlton Gibson
BBEdit's #! Menu has a rather useful Check Syntax option.
Unfortunately this is not active for PHP.
PHP however has its own linter which can be accessed via a command
line option. I'm just in the process of wrapping this in an
AppleScript.
What I'd like to do is to attach this script to #! > Check Syntax.
What I'm not sure about is how to convince BBEdit that it wants to
make this menu option active for PHP scripts. I'm hoping that
somebody will be able to steer me in the right direction?
BBEdit will enable or disable that menu item based on whether it knows
how to syntax check the language of the front document.

The best solution is to probably leave the script in the Scripts menu
and assign it a different keyboard shortcut.

Jim
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
Dennis
2008-03-29 19:58:20 UTC
Permalink
What I’d like to do is to attach this script to #! > Check Syntax.
What I’m not sure about is how to convince BBEdit that it wants to
make this menu option active for PHP scripts. I’m hoping that
somebody will be able to steer me in the right direction?
John Gruber wrote a good article on PHP syntax checking in BBEdit a
few years ago. You can find it here:

http://daringfireball.net/2003/12/php_syntax_checking_in_bbedit

-Dennis
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
Carlton Gibson
2008-03-29 20:05:03 UTC
Permalink
Post by Dennis
What I’d like to do is to attach this script to #! > Check
Syntax. What I’m not sure about is how to convince BBEdit that it
wants to make this menu option active for PHP scripts. I’m hoping
that somebody will be able to steer me in the right direction?
John Gruber wrote a good article on PHP syntax checking in BBEdit a
http://daringfireball.net/2003/12/php_syntax_checking_in_bbedit
Thanks Dennis,
as it happens I'd already seen that one—it's what gave me the idea
about attaching it to a menu item.

-Carlton
Post by Dennis
-Dennis
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
Loading...