Updates to the WordPress TextMate bundle

With all the new API enhancements in the last few versions of WordPress, I thought it was time to give my WordPress Textmate bundle an update, as I first released it exactly a year ago. Here are the things I’ve added:

  • esc expansionAdded ‘esc’ tab-expansion: with the help of Mark Jaquith’s great article Escaping API updates for WordPress 2.8, typing esc and then pressing tab now brings up a menu with options to choose the proper escaping function.
  • Localization shortcuts, Alt-L now wraps the selected text in a _e(''); function, that translates and outputs the selected text, while Shift-Alt-L wraps it in a __(''); function, which returns the selection.
  • A new widget-tab expansion, which works like this: [vimeo width="560" height="422"]http://vimeo.com/5249167[/vimeo]
  • A <body> tab completion function with the new body_class(); function, for its use, read this great article by Nathan Rice: WordPress 2.8 and the body_class() Function.
  • A author-tab expansion, with the new the_author_meta function, with some help from my own PHP Cross Reference and this article: Displaying Author Meta Information in WordPress 2.8
  • All functions that are prefixable with get_, like bloginfo and most functions above, now start with that. author->tab expands to get_the_author_meta with the chosen variable, but pressing space or delete immediately removes the get_ part. Neat huh?
  • A readme.txt template, including the new changelogs, just type readme->tab in a new file, this snippet uses some shell variables, be sure to enter these in TextMate for quick use.
  • A plugin template, open a new file, type plugin and press tab, and you’ll get the option of either adding just the “normal” plugin header, or one with the GPL embedded.
  • blog->tab now first ask you whether you want general info or RSS info, and the expands into a menu with all the options for each.
  • You should also try the $post, $comment, $cat, wpdb and row tab expansions, they’ve been slightly updated and totally kick ass.

Shell variables

Don’t forget to set the following shell variables in the TextMate config, which you can find under Advanced -> Shell Variables:

textmate-shell-variables

I’m very interested in hearing what you would like to see in this WordPress Texmate Bundle, so please leave your requests in the comments!

Yoast.com runs on the Genesis Framework

Genesis theme frameworkThe Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides you with the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Read our Genesis review or get Genesis now!

10 Responses

  1. SandyBy Sandy on 21 June, 2009

    very informative site. Keep it up.
    Cheers,
    sandy

  2. kate jamesBy kate james on 23 June, 2009

    Yeah i really liked this site ..
    What a site to visit.
    thanks

  3. StewieBy Stewie on 23 June, 2009

    Thank you so much. Btw I am using it under e text editor (windows) and your snippets are working well as other TextMate functionalities ;)

    Thanks, buddy.

    • DanBy Dan on 25 July, 2009

      Thanks for your comment. Will give them a try myself. Cheers !

      • StewieBy Stewie on 24 October, 2009

        Cool!
        Here is also x86 .deb of ‘e’ for Ubuntu users…

        http://code.google.com/p/textmate-huacnlee/downloads/list

        There has been nice development in licensing (up to version 2.0)…

        Based on thoughtful feedback from many users (many of whom had bought their own licenses), I have decided to make it possible to keep using the program beyond the trial period. This will stay possible for as long as the program is in beta state (ie up to version 2.0).

        http://e-texteditor.com/blog/2007/licensing

  4. miklbBy miklb on 29 June, 2009

    Really great to see someone pick the ball up on this, it’s quite useful. One suggestion would be to use the new(ish) have_posts()) : $foo->the_post(); ?> instead of query_posts. I think that function is being used more and more, and would be nice to have in the bundle. Regardless, thanks again for the updates.

  5. miklbBy miklb on 29 June, 2009

    hmm, seems that got garbled. Anyway, I was suggesting using the (new WP_Query) function rather than query_posts.

  6. MutantBy Mutant on 21 July, 2009

    Simply fantastic. Thank you so much for making this available.

  7. SamBy Sam on 5 September, 2009

    This is great — but I don’t see wp_page_menu, wp_list_pages, wp_list_bookmarks, or wp_get_archives — are those coming soon, I hope? Thanks very much for your work.

Trackbacks

  1. [...] new widget-tab expansion, which works like this: Click here to view the embedded [...]