Textmate is an editor I use a lot! Simple in use, but very powerful. Today I’ve been working on some PHP code where I needed to backslash a lot of double quotes. The solution: Use predefined commands!
Not really spectacular, but I just wanted to share this with you guys.

Open the bundle editor in TextMate and create a command in PHP.

Here you can define a command. Here is the command for adding slashes in your selected text:
sed 's/['"'"'"]/\\&/g'