43 Folders

Back to Work

Merlin’s weekly podcast with Dan Benjamin. We talk about creativity, independence, and making things you love.

Join us via RSS, iTunes, or at 5by5.tv.

”What’s 43 Folders?”
43Folders.com is Merlin Mann’s website about finding the time and attention to do your best creative work.

TextMate projects: faking metadata

Wrote this long-winded post to the TextMate list, so I thought I’d repurpose it here. Just quick tips on adding metadata to your text files and—because I’m a dull and repetitive scold—using controlled vocabularies to keep your stuff searchable.

This is a just a little tip for folks who run their life in TextMate (as I have begun to).

I have a single TextMate project in which I keep and maintain all my todo lists, project files, reference notes, etc. I’m a bit of a “Getting Things Done” nerd, so I admit to spending a lot of time fiddling around with lists. :)

I’ve evolved a standard header that I use for most of my txt documents that is similar to this example from my “Next Actions” (aka “to-do”) list

## Next Actions

  * _file_: “next.txt”
  * _purpose_: list of next actions needed for projects
  * _meta_: todo, next actions, task

Nothing too spectacular, but the little metadata line has really started to come in handy; I now can do a “Find in Project” on all my files and pick up any relevant hits—even when the term is not expressly mentioned in a given line of text. It’s a great way to bubble up hidden content—even when it’s many layers deep in the Finder.

The other, related tip, which I’ve mentioned before on my site is to try and standardize your vocabulary for TODOs or anything else you’ll want to locate in a pile. I try to begin all of my TODOs with a verb followed by a fairly detailed phrase. E.g.

Buy propane at Albertson's
Google the best way to run DynDNS on a Linksys; how to retain links?
Email John about his site updates for Friday

This becomes really useful for GREPing a list of related topics and even generating a new one.

TextMate has really made me want to hone my modest shell skills to learn what it can do, because it seems pretty limitless. I’m just starting to install a few commands that will concatenate related files and generate these kinds of searches on the fly. I’d love to hear how other folks are using TM and the shell for tasks outside development, web design, etc. There’s an awful of of power under that hood.

And, per that last bit, I do encourage fellow TextMate nerds to share their productivity tips in comments here.

bsag's picture

Like Merlin, I write a...

Like Merlin, I write a lot of documents using Markdown (particularly as the built in piping of web previews through Markdown.pl makes it all so convenient). In time - probably when there's a GUI for editing bundles - I'm planning to have a go at syntax highlighting, commands and snippets for Markdown files. Until then, I've been playing about with some commands to help markup Markdown (heh).

Someone on the TextMate list mentioned that 'heredoc' syntax is useful to run a set of commands with Ruby. Since I'm learning Ruby anyway, that suits me, and it gives a standard template for commands. Here are a few examples:

ruby <<END chars = wc -c puts "$TM_SELECTED_TEXT"+"\n" chars.times {print "="} END

This underlines your selection with H1 markup (you need to set Standard input to Selected text and Standard Output to Replace selected text).

ruby <<END print ""+"$TM_SELECTED_TEXT"+"" END

This wraps the selection in bold tags and is easy to modify for italics, H3 etc. It's easiest to trigger these with a keystroke, but if you've got a lot of commands, it gets hard to find an unused combination. Then I realised that I could take advantage of the feature in TextMate that pops up a menu under the cursor when you have a keystroke assigned to more than one command. I name all my Markdown commands something like 'bold.markdown' or 'h1.markdown' and assign Ctrl-Cmd-M to all of them. You select some text, hit Ctrl-Cmd-M and the menu with all the commands pops up. You can type the first few letters of the entry you want (e.g. 'bo') to select it, then hit Enter and - bam! - your selection is wrapped in markup. Or Markdown.




An Oblique Strategy:
Honor thy error as a hidden intention


Subscribe with Google Reader

Subscribe on Netvibes

Add to Technorati Favorites

Subscribe on Pageflakes

Add RSS feed

The Podcast Feed


Merlin used to crank. He’s not cranking any more.

This is an essay about family, priorities, and Shakey’s Pizza, and it’s probably the best thing he’s written. »

Scared Shitless

Merlin’s scared. You’re scared. Everybody is scared.

This is the video of Merlin’s keynote at Webstock 2011. The one where he cried. You should watch it. »