4

I recently started using jruby. In normal ruby's irb, I get vi readline support due to the .editrc file

.editrc file

bind -v

But jruby doesn't seem to use that file, and doesn't get the vi readline from the .inuptrc file either.

Is there a way to get vi readline support in jirb?

Tim
  • 365
  • 2
  • 15

1 Answers1

3

JRuby doesn't use libedit or readline, so those files are not read.

Furthermore, JRuby does not support vi editing mode.

irb(main):001:0> Readline.vi_editing_mode?
NotImplementedError: vi_editing_mode?() function is unimplemented on this machine
    from org/jruby/ext/Readline.java:358:in `basic_quote_characters'
    from (irb):1:in `evaluate'
    from org/jruby/RubyKernel.java:1022:in `eval'
    from org/jruby/RubyKernel.java:1338:in `loop'
    from org/jruby/RubyKernel.java:1131:in `catch'
    from org/jruby/RubyKernel.java:1131:in `catch'
    from /usr/local/jruby/bin/jirb:13:in `(root)'

Admittedly, JRuby's Readline support has a lot to be desired.

banzaiman
  • 2,631
  • 18
  • 27