Using TextMate, how can I wrap everything in PHP tags? A question about TextMate. For example, I just typed var_dump($codes);, and I forgot to write &lt;?php ?&gt;. So, now I want to highlight the area that I want to wrap the php tags around. How can I do this?
Simply add a new command called for ex 'Wrap in ' in your php bundle editor (Bundles->Bundle Editors->Show Bundle Editor) 

In the Activation choose: Key Equivalent and hit: CMD+SHIFT+W (or whatever you'd like that's not already taken).

Leave the scope selector to source.php

In the snippet window write:

&lt;?php  $TM_SELECTED_TEXT ?&gt;


Now select anything and hit CMD+SHIFT+W and you're done

Sorry I couldn't upload an image to show you I've just signed up.

EDIT I now have enough reputation to upload the image: