[TxMt] Snippet or command

Ben Alpert spicyjalapeno at gmail.com
Thu Sep 20 17:25:24 UTC 2007


Try this command (before: none, input: selection or nothing, output:
replace selection):

#!/usr/bin/env ruby

sel = STDIN.read.chomp
sel.match(/^(.+)(.)$/)
left = $~[1]
right = $~[2]
print "\\left#{left}\\right#{right}"

-- 
Q: Why is this message no more than five sentences?
A: http://five.sentenc.es/



More information about the textmate mailing list