简体   繁体   English

vi readline支持jruby的irb

[英]vi readline support for jruby's irb

I recently started using jruby. 我最近开始使用jruby。 In normal ruby's irb, I get vi readline support due to the .editrc file 在正常的ruby的irb中,由于.editrc文件,我获得了vi readline支持

.editrc file .editrc文件

bind -v 绑定-v

But jruby doesn't seem to use that file, and doesn't get the vi readline from the .inuptrc file either. 但是jruby似乎没有使用该文件,也没有从.inuptrc文件中获取vi readline。

Is there a way to get vi readline support in jirb? 有没有办法在jirb中获得vi readline支持?

JRuby doesn't use libedit or readline, so those files are not read. JRuby不使用libedit或readline,因此不会读取这些文件。

Furthermore, JRuby does not support vi editing mode. 此外,JRuby不支持vi编辑模式。

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. 不可否认,JRuby的Readline支持还有很多不足之处。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM