Page 1 of 1

cmsms-specific auto-completion of code - cool!

Posted: Fri Oct 16, 2009 9:00 am
by plger
Just found out a great tool, and I wanted to share it with other developers who like me maybe never thought about that...
I use Geany, so I don't know how you do this (or if you can) on other programs, but I know most good code editors (of course big environments like eclipse, but also small notepads like editplus) have similar functions.

Introduction (which you may skip):
No matter how much I program for a given system, all the function parameters and default values just don't get "saved" in my memory. So for instance I keep looking out CreateLink in the api to see if the $inline parameter is before or after the $urlonly. Then I thought: it would be so cool to have a tooltip with the function parameters for the CMSModule like the one I get for normal php functions. Then I thought that I probably wasn't the only one to have met this situation and looked out Geany's help for the first time (is it me or everyone using computers just never read any documentation and fumble with every device until they get a hang of it?). There it is, "tags files".

I copy pasted the module function list from the cmsms api and used a few "replace" to get the desired format, saved it as cmsms.php.tags (which I've attached to the post, just remove the .txt) and just imported in Geany using Tools->Load Tags. Now when I type CreateLink(, a little tooltip with the parameters and default values appears...

Now I understand why people nowadays can't remember a phone number. But still, I'm quite happy with this, and I thought if other people use such tag definition files it might be good to share it with other users.

Pierre-Luc