Ubiquity – PHP search & preview (updated)
As you know from my last post on Ubiquity and PHP, I love to search and use the add-on like a mad-man, but i just could not get PHP search fully implemented for all functions, so i’ve updated the darn plugin. It is version 0.4 because that’s where i feel it was last best iterated, without my trusty SVN enabled.
Whats new?
Well for starters, the PHP search algorithm (and its very simple indeed, just take a peak) can now search for all existing functions (atleast from what i’ve tested so far). If the function you searched was misspelled or incorrect, it fails nicely into the default “PHP Function List” search results, as PHP.net current does for your convenience.
Second, sometimes when I search for php functions, I don’t necessarily need to view all the content of the function page, that is: code usage, examples, notes, parameters and user contributed notes. So what do I do in this case? I simply give it an parameter action after the function name to just display that section.
Usage before:
Start Ubiquity and type “php strstr” … notice how it just returns all the code block usage, examples, etc. Also notice how the scrollbar appears, I hate that.
Usage now (with only examples):
Start Ubiquity and type “php strstr examples” … notice how it just returns only examples.
You can return everything with param action “all” or by sections “description”, “notes”, “comments”.
Go ahead, give it a try and let me know what you think. If you’re a web developer, please feel free to extend it even more via Github.
View the Ubiquity PHP command and install it here.
PHP Search Tips:
Displays function & examples: {FUNC}
Displays only description: {FUNC} desc or {FUNC} description
Displays only parameters: {FUNC} params or {FUNC} parameters
Displays only notes: {FUNC} notes
Displays only user contibuted notes: {FUNC} comments
Displays All: {FUNC} all
