Hello, I’m a wannabe Wordpress developer and just thought of a Sugar that would make my (and other developers/designers) life so much easier. The idea came when I read Joey’s post about blogging Sugar.
Is it possible to make a Sugar with Wordpress Template Tags? How I see it is that when I type for example “comments_”, I could get a dropdown with a list of template tags like “comments_link”, “comments_number” etc. to auto-complete. That would speed up Wordpress coding dramatically.
I think there is similar Sugar for ExpressionEngine - I haven’t tested it though since I don’t use EE at all and I’m not familiar with it.
Anyway, just a simple idea. You guys are doing fantastic work, I love the way Espresso is going and really hope it will be the best IDE ever since version 1.0 already
That’s a wonderful idea. I’ve been working with WordPress for some time but I still have to troll through the template tags page in their docs whenever I crack open a template. Have some WordPress-specific snippets and auto-completions would make life a lot easier.
Glad you like it then, Ian! I hope someone will find some time to write the Sugar. With popularity of Wordpress having a plugin like that would make Espresso even more popular, I bet.
I have no idea about creating Sugars, but seeing people’s work my idea doesn’t seem too hard. All the documentation is there, just need someone willing to spend some time on it. If a total newbie can help in the process in any way, please let me know, I would be happy to help
You could probably do it yourself, if you’re willing to get your hands dirty with some XML. The auto-completion stuff is all defined via XML and text snippets, and although the documentation still needs improving taking a look at the Sugars bundled with Espresso it’s usually pretty clear.
If not, I’m sure someone will pick it up. I’d do it myself if I weren’t so darn busy at the moment. I’ve been meaning to take a closer look at the syntax and completion aspects of Sugars.
On a related note, I used to use (php)Eclipse for all my coding needs and it would actually parse my PHP files and pull up autocomplete for my own, custom functions. That was super cool. If a Sugar could do something even more general like that it would be amazing.
donut: Jan will need to implement that, unfortunately. At the moment there’s no way for an XML Sugar to do it, and there isn’t any way for the Cocoa API to tie into the auto-completion system.
Adding auto-complete for WordPress methods would be a matter of editing some straight-forward XML; if this is something that’s impacting your workflow, you could definitely set it up yourself with a little bit of work. Let us know if you need pointers or help.
Adding auto-complete for WordPress methods would be a matter of editing some straight-forward XML; if this is something that’s impacting your workflow, you could definitely set it up yourself with a little bit of work. Let us know if you need pointers or help.
Hi Ian, if you could tell me where to start and explain in a few words how to do it, I would be definitely interested in doing this myself. Thanks!
I very recently switched from Coda to Espresso, and I do almost all of my web development in WordPress. I had an extension installed for Coda that did WordPress auto-completion. I missed it so much in Espresso!
I took some time and made a very basic auto-complete Sugar for WordPress template tags. I only covered the functions listed on their main Template Tags page, but I’ll be updating it soon with conditional tags and the other core functions (from their Function Reference). Also, I included the list of parameters for the “bloginfo” functions.
I’ve posted an updated Sugar on my website. I included all the functions in the Function Reference (which includes conditional tags) and added some snippets. I also fixed the weird behavior the autocomplete was having after typing underscores (either not continuing to complete, or starting the match all over again).
I registered on the Coffee House, and then saw I needed to register with GitHub as well. I set up an open source account, but I’m pretty new at using repositories and don’t exactly know what to do from there. If anyone can give me some pointers, it would be much appreciated!
Hosting the Sugar on GitHub isn’t really necessary to post it to CoffeeHouse (or at least it wasn’t previously; you just had to enter a download URL and leave the GitHub stuff blank). Sticking it up on GitHub is a nice way to keep the code version controlled and allow people to change it themselves and submit the changes back to you, though, so if you want to host it there I definitely recommend it.
Probably the best intro to git and GitHub you’ll find is GitHub’s help section. There’s also numerous free resources online to help you get up and running with git, like the free git book. Good luck! Let us know if you have any specific questions.