Table of Contents

A PHP Reference Tool for gEdit

If, like me, you write PHP code in gEdit, then you may find this reference tool helpful. PHP has excellent documentation online, but it's a bit of a pain to switch back and forth between your editing tool and your browser just to find the order of arguments for a particular function. I wrote a PHP script and created a list of PHP functions to handle these lookups for me. These instructions describe how to install it in gEdit.

External Tools Manager

First, you'll need the External Tools Manager plugin for gEdit. To turn this on, do the following.

PHP Lookup Tool and Function List

Next, you'll need my PHP lookup tool and my list of PHP functions. Download phpfunc.txt and phpref.php from my Plain Text List of PHP Functions and Their Arguments page.

cd /usr/bin
ln -s /home/joel/phpref.php phpref
phpref echo

Adding the Tool to gEdit

Finally, we want to add the new tool to gEdit.

xargs -I '{}' phpref '{}'

Using It

Now, you should be able to highlight any function name in gEdit and press <Control>r to look it up. If you can't remember the exact function name, try looking up something like “mysql”. All functions that start with “mysql” will be displayed.