Textmate Trick – Execute one liners inline inside Textmate

You want to run some ruby inside the text editor?  With Textmate you can,

Simply write your code

[1,2,3,4,5,6,7,8].sort! {rand(1000)}

Then click on that line and hit SHIFT + CONTROL + E / shift + ctrl + e

Now you have

[1,2,3,4,5,6,7,8].sort! {rand(1000)}
[8, 5, 1, 6, 3, 7, 2, 4]

You can see the result is appended to the next line. Nice!

Posted on March 28, 2009 at 11:40 am by Jordan Carter · Permalink
In: Uncategorized · Tagged with: ,

Leave a Reply