Over a million developers have joined DZone.

Lookup PHP Docs Directly From JEdit (OS X)

DZone's Guide to

Lookup PHP Docs Directly From JEdit (OS X)

· ·
Free Resource
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 });

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}