[TxMt] Converting a single-line block into a multi-line block
Matt Mower
matt.mower at gmail.com
Fri Nov 25 20:08:55 UTC 2005
Hi,
I was looking earlier on at a video some guy did of a VIM macro he'd
written that could turn:
object.method { |x| op( x ) }
into
object.method do |x|
op( x )
end
and back again. At the time I didn't think much of it and now of
course I find myself wanting to do it.
I thought for a few minutes about how you might achieve this in TxMt
and then realised I didn't have the first clue. I tried recording a
macro but of course it would only work for the simple case, as soon as
I did:
object.meth2 { |x,y| op(x,y) }
it broke.
Can this (and/or the inverse) be done with a simple recordable macro?
Regards,
Matt
--
Matt Mower :: http://matt.blogs.it/
More information about the textmate
mailing list