Skip to main content or search

Trick Your TextMate: Foldings

Thursday August 31, 2006 / 5 Comments

Once again, I discover a small, but wonderful feature that has made life simpler. Foldings. With a single keystroke, you can collapse or expand sections of your markup, CSS, or code. You can toggle all foldings by pressing Opt + Apple + 0 or toggle n levels deep by using Opt + Apple + 1 for collapsing only the first level all the way to Opt + Apple + 9 to collapse your 9th level of code.

For markup This has become indispensable for looking at the overall structure of a file to determine how it’s built and the relationships between different div’s. It also allows me to collapse my CSS selectors for easier skimming. As usual, one of the keys to increased productivity is leaving the keyboard as little as possible, and this is just one more great trick to help you do that.

Featured Stuff - Resources: Wireframes & Page Description Diagrames

Omnigraffle and Visio versions of the wireframe templates and stencils I use on all of my projects. There’s even a few examples included for good measure. More about Wireframe & Page Description Diagram Stencils and Templates


My favorite thing to do in TextMate is to use the Snipplr plugin (bundle) which allows me to grab and update code snippets.

Jon Henshaw

My favorite Textmate folding trick is to highlight two or more lines of text and then hit F1 to fold it. This works great with TODO lists or anything hierarchical in nature.

Dan Kubb

Loving it. I have been using BBEdit for TOO long. I can’t believe I haven’t found this earlier. Thank you.

eric

Fantastic tip! Where this feature has been all my life I will never know!

Luke Walding

Fantastic tip! Where this feature has been all my life I will never know!

It’s been in Visual Studio :) (VS also allows you to define your own Regions outside of the default ones created by html tag sections or variable/methods)

Mike Mannis

Comments are closed for this entry.