[TxMt] Re: How to transform a single column into two columns in TM2?

Paul McCann paul.mccann at adelaide.edu.au
Sat Jan 18 23:25:38 UTC 2014


Hi Comer,

that's not really something you'd expect to be built in, but the hooks are
there to apply pretty much any scripting language to get the job done: for
example, using Perl.

(In Textmate)

Text => Filter through command...

   perl -pe 's/\n/ / if ($.%2)'

This substitutes a space for the newline character at the end of the line
if the line number ($.) is an odd number.

Cheers,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20140119/32811599/attachment.html>


More information about the textmate mailing list