Copy that file to your personal ~/.jedit/ directory and rename it. You don't really need to do this, although i find that it helps when upgrading jEdit to have any customized scripts in your personal directory (so they wont get over-written). I renamed mine "Run_Skript.bsh". On a windows computer, the macro script is: C:\Documents and Settings\$USER\.jedit\macros\Run_Skript.bsh, on linux, put it into ~/.jedit/macros/Run_Skript.bsh
else if(mode.equals("perl")){
execScript("perl", "perl " + path);
}
// ------ New code
// PHP mode. Put the proper path to the PHP executable!
else if(mode.equals("php")) {
execScript("php", "C:\\php\\php.exe " + path);
}
// ------ End new code
else if(mode.equals("python")) {
execScript("python", "python " + path);
}
Now you have the macro script setup, it's time to bind it to a keystroke.
Go to the menu "Utilities -> Global Options -> Shortcuts"
and select "Macros" from the "Edit Shortcuts:" dropdown.
Find the name of the macro script ("Run_Skript") and bind it to
a keystroke of your choice.
From now on, when you're in a PHP buffer, you
can whack the key and it will run your script thru PHP and show you
the output in the console.
The commando PHP.xml file is here (Right-click to save.)
First, go to "Plugins" and install Console and Commando and any dependancies they might require.
I basically looked at some of the existing Commando files and hacked together one for PHP. My PHP.xml is a kludge, i personally prefer the above Macro method rather than doing this thru Commando. YMMV.
But anyway, when you've installed Commando, copy my PHP.xml file into your local ".jedit\console\commando" directory. For me (on Win2k) it's: C:\Documents and Settings\scott\.jedit\console\commando
Then, please open up PHP.xml and edit it to set the proper path of your PHP executable.