In a sense this is trivially possible in any editor with plugin/scripting capabilities. It's just a question of how much work you're willing to put in.
For example, this blog describes how to do it in Vim. The specific method is not really important, the point is that it's possible because of the features that Vim has:
So it can basically automate what you would do manually: copy some source code, paste that code into the interpreter, run it, capture the result as text, paste it back in the editor.
I suppose this feature is very common for functional languages (at least Elm, Haskell supports this, too) but I don't think it's possible in Ruby. But you can use REPL (eg. IRB or Pry) to get the return value of the statement you typed after pressing enter key.
If there is an IDE Extension that supports this feature I'm very eager to hear about it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.