SublimeREPL icon indicating copy to clipboard operation
SublimeREPL copied to clipboard

Pry: Ruby evaluation is not well displayed

Open romainonweb opened this issue 13 years ago • 3 comments

With IRB it was fine, but with pry ( I use it since today ) there is a bad display:

File: puts "Hello World"

Repl: [1] pry(main)>

If I press "ctrl + , and f: Repl: [1] pry(main)> [1] pry(main)* Hello World => nil [2] pry(main)>

If I press ctrl + shift + , and f: [2] pry(main)> puts "Hello World" And I type Enter and I have: Hello World => nil [3] pry(main)>

So manually it's OK but when it is auto evaluating it is not good

romainonweb avatar Sep 02 '13 19:09 romainonweb

Try changing

    // If set to true, SublimeREPL will try to append evaluated code to repl
    // output before evaluation (e.g. Ctrl+, f)
    "show_transferred_text": false

to true and see if that heps?

wuub avatar Sep 02 '13 20:09 wuub

It is working better ! I though I had changed this parameter to test but I'd notice the improvement.

I just want to add this difference between manual and transfert:

Manual way: [1] pry(main)> def say_hello() [1] pry(main)* puts "Hello" [1] pry(main)* end => nil [2] pry(main)>

Transfert way: [1] pry(main)> def say_hello() puts "Hello" end [1] pry(main)* => nil [2] pry(main)>

By the way thanks for your amazing work

romainonweb avatar Sep 02 '13 21:09 romainonweb

I just want to add this difference between manual and transfer

Yup. Text transfer evaluates whole region in one go, while typing them in REPL transfers each line separately.

In Ruby it's mostlly equivalent, but for example in Clojure or Python evaluating larger blocks line by line can cause errors.

I assume this can now be closed, if you have any other questions, don't hesitate to open this issue or create a new one ;)

wuub avatar Sep 03 '13 07:09 wuub