February 24, 2010

WordPress template tags auto-complete Sugar for Espresso

NOTE: I have updated this sugar since this post. Download the updated version here.

I’ve been post-less for a little while, I know… Life happens, things get busy, you know how it is.

For now, I’m posting a Sugar I made for Espresso. For those who don’t know what I’m talking about, Espresso (by MacRabbit) is a web developing program that I’ve been trying out. It’s been the only thing sweet enough to get me to switch from Coda. Extensions for Espresso are called Sugars.

I made a Sugar for WordPress template tags. There had been some interest in one on the MacRabbit forums, but none had been made yet. I figured I’d give it a shot.

It contains CodeSense/auto-completion for all the WordPress template tags listed here. I haven’t done the conditional tags yet, and there are still some core functions left out. Rest assured they will be included in an updated version, soon.

Updated in version 1.1:

  • Added all the functions in the Function Reference (includes conditional tags)
  • Added snippets:
    • The Loop
    • A custom loop
    • Dynamic page title (404/archive/page/search/etc.)
    • register_sidebar function & parameters
    • HTML stylesheet link
    • Theme info header for style.css
    • Quick reference of query_posts parameters (a huge commented section of code, listing the parameters from the query_posts Codex page)
  • Fixed weird autocomplete behavior after typing an underscore (either not continuing to complete, or starting the match over again)

Here it is:

Download WordPress.sugar v1.1

(Possibly) Related Posts

  1. A rambling train of thought on SimpleMap categories & tags
  • Pingback: WordPress template tags Auto-complete Sugar for Espresso

  • http://suleiman.leadbitter.info Sulcalibur

    Thank you! :)

  • Tom

    Thanks, this rocks!

  • http://www.pandu.ch Claudio

    im just switching from coda to espresso and this was the only thing i really missed! thank you for taking the time to do this.
    looking forward to the updated version!

  • http://www.crispeegrafix.com Chris

    Thanks – I’m glad you did this. Why isn’t it in the coffee house?

    • Alison

      I’m in the process of getting the code on GitHub to get it on the Coffee House. Hopefully that will be completed today or tomorrow!

  • Pingback: wp-popular.com » Blog Archive » WordPress template tags auto-complete Sugar for Espresso | Aliso the Geek

  • http://www.fruits.owlgraphic.com Owl

    Thanks:)

  • http://john.onolan.org JohnONolan

    I’ve only just started using Espresso even though I’ve owned it for ages, and this is exactly what I needed! Thank you! :)

  • http://Website Johan

    Is it just me or is “have_posts()” not in the sugar?

  • http://Website Johan

    My bad! It was rude only to sound negative, sorry! :(

    I LOVE this sugar! Thank you very much! It’s highly appreciated!

    • Alison

      Thanks! You’re right, “have_posts()” isn’t in there because I forgot it. I was typing like crazy while working through the really long functions list, and my brain just didn’t realize that a few of the common ones weren’t even there. I’ll be sure to include it in the next update!

  • http://www.ignacioricci.com Nacho

    Awesome! Thanks a ton!

  • Dan Butcher

    I’m going to reveal my complete ignorance here: I can’t figure out how to get the autocomplete to work. I’ve used the Zen Coding TEA, and I know that I hit F1 to autocomplete with it. How do I autocomplete with this Sugar?

    • Cristián

      Second that. Sugar is on my /Library/Application\ Support/Espresso/Sugars folder, but it doesn’t seems to work for me. I’m new to Espresso, and I’m trying it out to find out if it could be better for me than Coda.

      • abarrett

        The autocompletion should follow the settings in your Preferences, so I’m not sure why it wouldn’t be working… I’ll try to take a look at it and figure it out.

  • http://www.thamtuthanhlong.com tham tu

    Than you!
    tham tu

  • Castle

    Hi,

    The link is broken!

  • Josh

    Any chance of a repost?

  • Mauricio Gamboa

    The download link is broken :s

  • Steve

    The download link no longer works. =(

  • http://www.youfounderic.com Eric

    Hey, I was really excited to try this out but your link isn’t working anymore. Any chance you could update this?

  • Josh

    Works perfectly now, thank you!

  • http://www.mcbwebdesign.co.uk/ Martin Bean

    This is awesome-o!

  • Windo

    Thanks, atm am trying out espresso as well,..

  • Gabe

    Awesome Sugar! However, it keeps “uninstalling itself”. Basically I will install it, get it working, & it will be gone the next time I login. Any ideas on why this could be happening?

    Thanks!

    • Gabe

      Ok, so it looks like the Sugar works just fine. I am just having an issue with my header.php files never showing php tags of any kind. Thanks for the Sugar!

      • Alison Barrett

        I’ve had this problem in the past as well. I think it’s a bug with Espresso where it doesn’t assume PHP syntax on a PHP file if it starts with an HTML doctype. It might help to put an empty < ?php ?> before the doctype.

  • Emil

    Thanks for the sugar! I have an issue though. Then i try and type “the_post()” it keep insisting to call “the_post_thumbnail()”… Even if I delete the autocompleted text and then try to type open/closing parentheses it still falls back to the_post_thumbnail().

    Don’t get me wrong, I love the sugar, but this bug just kills it for me. A fix for this issue (as well as added support for “have_posts()” :-) would add you to my top favorite people in the world ^^,

    Cheers

    • Emil

      Never mind! I didn’t see the update message on the top of this post. Thanks a lot for the great update! It seems you are my favorite person the world after all :D haha

      Thanks

  • http://twitter.com/christianramsey Christian Ramsey

    For some reason Espresso isn’t recognising the sugar, although the sugar is installed in 2 places, manually in the SharedSupport/Sugars/ folder and Espresso also installed it in the Library/Application Support/Espresso/Sugars