11.27.05

TextMate’s little surprises

Posted in html/css, TextMate at 11:53 pm by Haris

Textmate never ceases to amaze me. This time I was editing an html file, and I used the internal html preview window that it has, and then I left the window open. The miracle that occurred is that as I continued editing, the preview window was automatically updated instantly! Without me even having to save the file! As I was typing! It’s those little touches that make me love it!

Edited to add: I just found out a tip from Tim Door for a great snippet. Just use the following lines for the snippet:

//-${1/(.)|(?m:\n.*)/(?1:-)/g}
// ${1:${TM_SELECTED_TEXT:Comment}}
//-${1/(.)|(?m:\n.*)/(?1:-)/g}

I wish I could show you in a movie what this does, but I can’t. Basically, when activated, it will create three lines:

//--------
// Comment
//--------

And as you edit the Comment part, the length of the dashes increases to match exactly the length of your comment. It’s awesome! Now if only I could figure out how it works…

Later

Leave a Comment