Is there a possibility in VIM to repeat "Execute and Update '# =>' Markers" TextMate feature for ruby code.
I'd like to have something like:
x = 2
class A
def a
42
end
end
x # =>
A.new.a # =>
Enter some command... and get
x = 2
class A
def a
42
end
end
x # => 2
A.new.a # => 42
Here is a description of this feature from Ciarán Walsh’s Blog:
Another tool definitely worth knowing is the "Execute and Update '# =>' Markers" command (on ⌃⇧⌘E by default). To use it, add some comment markers (there is a snippet on #⇥ that will insert these for you) to the end of lines you would like to see the results of and then trigger the command. TextMate will run your code and report the result of the marked line inline in the comments. This feature is great for code posted online since it shows the source and the results together.
Use xmpfilter
from rcodetools.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With