Textpad PHP manual lookup tool

A little tip for those of us using textpad to develop in PHP. How often do you find yourself having to go back to PHP.net to check up on a function – is it ($needle, $haystack) or ($haystack, $needle)? I can never remember! With this tool I just need to highlight the function in textpad, press Ctrl-1 and up pops php.net in a new tab, opened on that function’s manual entry. Neat huh?

Here’s how:

1) Go to Configure->Preferences->Tools->Add->DOS Command:

2) Then enter the following in the popup dialog:

start http://php.net/manual-lookup.php?pattern=$Sel

3) Then in the tool’s preferences, untick “Capture Output” and tick “Close DOS window on exit”:

Now any time you want to lookup a function in your code, simply highlight or double-click it and press Ctrl-1 to be taken to that function’s manual page on PHP.net, in a new tab in your default web browser.

While we’re on the topic of textpad tweaks, did you know you can jump to the matching brace by pressing Ctrl-M? Very handy for spaghetti code. Share your textpad PHP IDE tips below! And if you haven’t already, why not take this opportunity to, you know, actually buy textpad after all this time? <grin>

Related Posts:

, , , ,

  1. #1 by Martin Gillow on March 5, 2010 - 10:08 am

    Did you know you can do Ctrl-Shift-M which will select everything within the matching braces?
    Useful if you want to comment out a whole function for debug purposes for example. Just set a macro to do the following:
    1. Ctrl-Shift-M
    2. Replace (Find: \& Replace: /*&*/ ) with Regular expressions on.
    3. Close

    There you go – nice commented out code. Just be careful if there are already /* */ commented lines within as you can’t have them nested :(

    Oh and BTW, make sure you select the closing brace – doing this from the opening brace will select both braces too!

    • #2 by Howard Yeend on March 8, 2010 - 12:54 am

      neat! thanks for sharing :0)

      textpad macros are sooooo useful.

    • #3 by James on May 7, 2011 - 10:12 pm

      Thank you Martin. Nice little trick. I’ve been using the lookup tool for a little while now (really awesome) but I hadn’t though of the macro trick.


  2. #4 by xander722 on June 11, 2011 - 7:06 am

    Thanks for the blog! Now, I already know the easy way using text pad.

Comments are closed.