I've figured this out using a custom snippet:
<snippet>
<content><![CDATA[
{
$SELECTION$1
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>hello</tabTrigger> -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js, source.php</scope>
</snippet>
... and then binding that snippet to a key combination. If you use the snippet you might want to change the scope (depending on the language you need), or just disable it entirely.
I'll leave the answer here just in case somebody needs it!