More TextMate goodness

TextMate BundlesAs I was working in TextMate this week, I needed to do a LOT of html editing, and wanted to code-fold the <p> tags so that I could focus on the other bits I needed to edit.

Code folding is very similar to the feature that allows you to expand or collapse folders in your favorite file system browser (e.g., Windows Explorer or the Finder or Nautilus).  What’s great about it is that you can collapse the sections you’re not working with and focus just on the one you need.

TextMate, by default, didn’t allow for folding <p> tags.  One of the things I love about TextMate, however, is that there’s plenty of customizability.  In the screenshot, the highlighted sections of text show the regular expression used to determine what html tags to fold.  I simply added in “|p” in both then opening and closing brackets sections and closed the window.

Access to this type of tweaking is normally only given in open source software, where the rule is, “You break it, you fix it.”  My hat’s off to MacroMates for being so awesome. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *