Sublime Forum

Filter Though Command / Insert Command Output

#1

This is a TextMate feature that I haven’t seen in Sublime. Is there a way to emulate this?

0 Likes

#2

Can you explain the feature a little more? I don’t understand what it is.

0 Likes

#3

Yep, sublimator got it. There are two handy commands in TextMate:

  • Execute Selection Inserting Result. Not sure if this is smart about what “execute” means; quick testing on a ruby file just runs the selection through bash.

  • Filter Through Command, which brings up this pane:


0 Likes

#4

I really miss the “Execute Selection Inserting Result” command from TextMate.

It’s the feature that lets us run code, and TextMate autofills in the “# =>” markers with the returned values. I can have a file like this:

asdf = "foo" # => 
sdfg = "bar" # => 
puts asdf + sdfg

and run the “Execute Selection Inserting Result” command, and get:

asdf = "foo" # => "foo"
sdfg = "bar" # => "bar"
puts asdf + sdfg
# >> foobar

It’s great for quickly showing whether something worked right, or documenting the results.

0 Likes