chrisruzin.net :: TextMate ExpressionEngine Bundle (April 5, 2006)

Skip to main content
Newer: April 2006 Top 10 Songs Older: 1-2-3-4-5-6

TextMate ExpressionEngine Bundle

Several months ago, I made the switch from BBEdit to TextMate. I haven’t regretted that decision once. In fact, with each new update of TextMate, I become more confident I made the right decision.

I do quite a bit of work that involves ExpressionEngine, which has it’s own markup similar to XHTML. I wanted a way to easily differentiate between regular XHTML and EE markup. Thanks to the flexibility of TextMate, I was able to create a bundle that does just that, plus some.

Example of my EE bundle for TextMateYou can see in the example to the right that all EE tags are highlighted for easy identification. It doesn’t highlight EE tags inside of quoted strings though, but that’s not a big deal.

Another feature you can see in the example is that I’ve included many snippets to make creating new templates much easier. In the example, I’ve typed in “entries” and hit the Tab key. Since there are three snippets that have that trigger, all three are listed and I can choose which one I want. I select the {exp:weblog:entries} tag and it adds in the basic structure that I need to get started. I can quickly tell it what weblog to use, what to disable and any other parameters thanks to how TextMate’s snippets allow for cursor placement. I’ve included over 50 snippets and plan to add some more soon.

Another really cool feature is shown below. You can select an EE tag and hit control-e to open up a small window showing the manual instructions for it. It will work on all standard tags that include “exp:” in them as well as a few others commonly used. It will not work with plugins since there’s no way I could easily keep up with all of them.

One that is set up a little different, and I use a fair amount is the time formatting entry. Instead of selecting the tag name, you select the “format” parameter and it will open up the manual to the time formatting instructions. I can never remember what the different options do, so this comes in quite handy.

Download the TextMate ExpressionEngine bundle.

Example showing the EE manual entry for a selected tag

April 30, 2006 - I’ve taken some time to polish up the bundle now. I’ve redone the entire language file in the bundle which makes for much better highlighting and code folding now. If you’d like to try it out, subscribe to the mailing list and look for a recent thread titled ‘ExpressionEngine bundle’. It’ll be attached to an email in the thread.

April 30, 2006 - I’ve now made it available for download on this site. If you use EE and TextMate, download the bundle and let me know what you think. Submit feature requests here too.

June 22, 2006 - I’ve uploaded a newer version of the bundle. No huge changes with this one, just a little organization in the bundle menu. If you’ve got some tags, templates or other features you’d like to see in the bundle, let me know.

Sept. 7, 2006 - The bundle has been updated to include EE comments, wiki tags, the improved embed tag, the simple commerce purchase tag and a few other additions. If you have anything else you’d like added to the bundle, or you’ve found a mistake, let me know.

June 6, 2007 - I’ve polished up a couple of the existing snippets, and added a few more that were missing. The biggest addition to this version is auto-completion of EE parameters. I believe I’ve got them all included. Let me know if I’ve missed anything.

Oct. 23, 2007 - Just a note to let Windoze users know that my bundle will work with e-Texteditor. You might get a lot of error messages when unzipping the file, but it should still work correctly.

Feb. 11, 2009 - Minor update. I’ve added some more parameters to the auto-completion list, and added the {wiki:categories_list} tag. I also added Dane Thomas’ EE comment preference to the bundle. Now you can easily wrap any code inside of an EE template in an EE comment ({!-- --}).

Chris's gravatar Chris United States April 9, 2007

Are you selecting a tag before you try to look up the documentation on it? It sounds like you’re not. Make sure you’ve selected a tag (‘exp:weblog:entries’, not just ‘entries’), then look up the documentation.

Lisa's gravatar Lisa United States April 15, 2007

Hey Chris – I was trying to extract this on Windows to use with e-texteditor (which supports Textmate bundles) and it throws a slew of errors – a friend had the same problem.

All sorts of stuff about fixing invalid filenames and not being able to create files on extraction. :(

Chris's gravatar Chris United States April 16, 2007

Yeah, I know. It still works. I used WinRAR to open the ZIP file and it threw out a ton of errors. Like I mentioned earlier in the comments, the errors are from the ”:” in the snippet names. WinRAR replaces them with ”_”, but the bundle still works.

Lisa's gravatar Lisa United States April 16, 2007

Yea, a friend had to do some renaming so I could get it. I got it working but the program itself has some oddities, meh. Anyway, thanks. =)

Mark's gravatar Mark Morocco June 11, 2007

Thanks a lot, this make me like textmate even more now!

Swaymedia's gravatar Swaymedia Great Britain (UK) September 11, 2007

Can I ask what software you use on the first screenshot with the screen of code?

Chris's gravatar Chris United States September 11, 2007

I’m not understanding the question. Are you asking what I used to take the screenshot, or what program is in the screenshot?

If it’s the first question, I’m using the built-in selection capture command: command-shift-4. If it’s the second question, then it’s a 3-part screenshot of TextMate.

Geoff (gtcaz)'s gravatar Geoff (gtcaz) United States November 8, 2007

Thanks for porting the bundle to e! That’s exactly what I stopped by for.

Stven Hambleton's gravatar Stven Hambleton Australia November 18, 2007

For sme reason I can’t choose to highlight the EE code. I only get the usual stuff like HTML, CSS etc.

matt spiel's gravatar matt spiel United States June 21, 2008

thank you so much for doing something like this… it will speed up site built times like crazy!

Efrain's gravatar Efrain United States July 30, 2008

Thanks! I’m using e-texteditor and it works great!

Justin Long's gravatar Justin Long United States September 3, 2008

Thank you, I was in the process of developing like this for Coda but TextMate works great and does a little bit better at color coding code which makes life so much easier

Miles Pearson's gravatar Miles Pearson Great Britain (UK) September 3, 2009

I would just like to say a big thank you for making your work with a textmate bundle for expression engine publicly available.

I am in the early learning stage for both and so your bundle could not be better timed. One of my best discoveries in a long time – Thanks again

Miles Pearson's gravatar Miles Pearson Great Britain (UK) September 3, 2009

Created a quick lookup cheat sheet to Chris’ bundle.
Handy whilst getting to grips with the shortcuts.

It’s a downloadable pdf.

http://milessentme.com/products_i_am_using/expression-engine-meets-textmate/

Robin's gravatar Robin Great Britain (UK) November 18, 2009

Anyone know a way to get this working with SublimeText?

http://www.sublimetext.com/

Robin's gravatar Robin Great Britain (UK) November 25, 2009

Any chance of getting it to work with Sublime Text. It’s like e-texteditor only a lot better. http://www.sublimetext.com/

Your name is mandatory
Your email address is mandatory
Your comment is mandatory Formatting:
_emphasis_
*strong*
-deleted text-
@code@
   What word do you see to the left?
The captcha is mandatory