开发者

Fix hover "ri" in Janus, Vim setup?

开发者 https://www.devze.com 2023-04-12 20:38 出处:网络
I have installed Janus to improve my vim. All works fine, except for the Ri documentation, that opens on hovering a keyword. On my installation it shows the output of \"ri --help\" instead of the docu

I have installed Janus to improve my vim. All works fine, except for the Ri documentation, that opens on hovering a keyword. On my installation it shows the output of "ri --help" instead of the documentation of the keyword.

开发者_C百科I have found a way to disable it, but I'd rather just fix it. I am using gvim on Ubuntu 11.10.

What is the name of the plugin or script that offers these tooltips?

Could it have anything to do with RVM being active?


The problem is a bug in the ruby.vim plugin. That triggers ri with a wrong argument.

There is a bug report for this.

Solving is easy: edit file .../ftplugin/ruby.vim and change line 194: the -f argument should not be simple, but either bs or ansi. I had success with bs.


Does any of these shortcuts (from ri's homepage) work, especially the last two?

  • ,r opens the search/autocomplete window, and will use a horizontal split to display matching documentation
  • ,R opens the search/autocomplete window, and will use a vertical split to display matching documentatoin
  • ,K opens the search/autocomplete window and prefills it with the keyword under the cursor
  • K is automatically remapped to use ri.vim if the current buffer is a *.rb file
0

精彩评论

暂无评论...
验证码 换一张
取 消