RapidWeaver's %pathto%, TextMate can help

TextMate300It’s no secret that many RapidWeaver developers are quite close and help each other out quite a bit. It’s also no secret that in order to develop RapidWeaver themes you need to use some pretty powerful tools. Some of use TextMate, the most powerful one in my opinion. There are so many ways to extend TextMate’s features to streamline our workflow, one of the simplest is to edit existing bundles by tweaking their commands or snippets or making a command or snippet of your own.

So back to the RapidWeaver developers… recently, Giuseppe at Bonsai Studio shared a TextMate snippet with the other developers. A snippet that would write a very specific RapidWeaver string that we tend to use quite a bit:

<script rel="stylesheet" type="text/css | text/javascript" src="%pathto(script/filename.file)"%></script>

I jumped all over this because as you may know I am a huge TextMate nut. However, the snippet didn’t quite run the way I wanted. So I set about to make it the way that was most useful to me. The main difference being that mine would highlight the file path when activated making it an even faster shortcut for me.

But I didn’t stop there. I wanted one that would handle <link> as well. So the result is to snippets that quickly write a <script> string and <link> string that include the %pathto% syntax.

So if you are a heavy TextMate user and happen to develop RapidWeaver themes then you might be interested in these two snippets.

 

Adam Merrifield

 

Leave a Reply