DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Lookup PHP Docs Directly From JEdit (OS X)
This is a BeanShell script that opens your browser and loads the PHP documentation page for the PHP function selected in the current buffer.
To install
1. Save this file as ~/.jedit/macros/PHPLookup.bsh
2. Select some text in jEdit
3. Select PHPLookup from the Macros Menu
NB. If you're running something other than OS X you will probably need to edit the script and replace the command string with something more appropriate - firefox will probably work on Linux if you have it installed.
String docURL = "http://nz.php.net/manual-lookup.php?pattern=";
String command = "open";
String selection = textArea.getSelectedText();
if (selection != "") {
String docSearch = docURL + selection;
Runtime.getRuntime().exec(new String[] {command, docSearch });
}






Comments
Snippets Manager replied on Mon, 2012/05/07 - 2:14pm