ClosestStorm / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

ruby.vim plugin shows error when displaying balloon tip with invalid 'ri' options #342

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Mouse over a method name in Ruby code that triggers the ballooneval tooltip to 
display.

What is the expected output? What do you see instead?

Should show ruby ri output for the method name.  Instead it shows a usage 
message for ri because ri is being called with an invalid set of options.

See the following line of code:
https://github.com/b4winckler/macvim/blob/master/runtime/ftplugin/ruby.vim#L194

the argument '-f simple' is invalid for ri and the balloon is showing the 
entire 83 line usage message for ri instead.

From the usage message:
...
-f, --format=NAME                Uses the selected formatter. The default
                                     formatter is bs for paged output and ansi
                                     otherwise. Valid formatters are:
                                     ansi bs html rdoc

...
"invalid argument: -f simple"

What version of MacVim and OS X are you using (see "MacVim->About MacVim"
and  "Apple Menu->About This Mac" menu items, e.g. "Snapshot 40, 10.5.6
Intel")?

Snapshot 59 installed from homebrew, OS X Intel 10.7 Lion GM

Please provide any additional information below.

After tracking down the root cause of this (which took a while) I tried to 
disable this functionality in my .gvimrc file.  I could get the balloon to stop 
displaying in macvim if I issued ':set noballooneval' in my vim window.  
However, putting the same command in my .gvimrc file failed to do anything that 
I could notice.  I worked around this by adding 'set balloondelay=100000' in 
that file.  This seems to do the trick.

Original issue reported on code.google.com by gl...@thrillcall.com on 13 Jul 2011 at 9:30

GoogleCodeExporter commented 9 years ago
If I understand you correctly this is a problem with the ruby.vim plugin and as 
such should be reported to the plugin maintainer (name/email is at the top of 
the plugin file).  The maintainer will then fix the problem, send it on to Bram 
and he'll merge the fixes with mainline Vim, then I will be included with 
MacVim when I pull from mainline.

Original comment by bjorn.winckler@gmail.com on 14 Jul 2011 at 7:49

GoogleCodeExporter commented 9 years ago
I have forwarded this bug report to the email address in the file and asked for 
his commentary.

It might be a separate bug, but do you know why the 'set noballooneval' in 
.gvimrc seems to have no effect (see my additional info section above). It does 
work when entered directly in a macvim session.

Original comment by gl...@thrillcall.com on 14 Jul 2011 at 9:30

GoogleCodeExporter commented 9 years ago
Thanks for reporting to the author.  If you get no reply, could you please 
forward the issue to vim_dev and state that you tried to contact the plugin 
author?

As for the 'ballooneval' issue: this sounds like you have a plugin which is 
enabling this option.  You should be able to find out where it is set by typing 

:verbose set ballooneval?

Original comment by bjorn.winckler@gmail.com on 20 Jul 2011 at 12:35

GoogleCodeExporter commented 9 years ago
Thanks for the tip.

I have not heard back from the listed maintainer so I've submitted a post to 
vim_dev with a link to this bug and a summary of the issue copied from this 
bug.  It is awaiting moderation.  Thx

Original comment by gl...@thrillcall.com on 20 Jul 2011 at 8:00

GoogleCodeExporter commented 9 years ago
I'm having the same trouble. The "set noballooneval" in ~/.gvimrc.local is not 
having any effect.

I get the following when running ":verbose set ballooneval?" in MacVim:

ballooneval
      Last set from /Applications/MacVim.app/Contents/Resources/vim/runtime/autoload/netrw.vim

I don't think that's from a plugin...

Running MacVim snapshot 61 on Lion

Original comment by erbmi...@gmail.com on 19 Aug 2011 at 4:48

GoogleCodeExporter commented 9 years ago
Aha.  So the netrw plugin (which is bundled with Vim) is enabling the 
'ballooneval' option behind your back.  Please write to the plugin author and 
plead with him not to enable 'ballooneval'.  Let me know how it goes.

Original comment by bjorn.winckler@gmail.com on 30 Aug 2011 at 7:40

GoogleCodeExporter commented 9 years ago
I've written a little walkthrough on how to patch MacVim to stop this from 
happening:

http://icy.io/misc/latest-macvim-ruby-annoying-ri-balloon-issue/

Original comment by erafal...@gmail.com on 11 Sep 2011 at 8:43

GoogleCodeExporter commented 9 years ago
For the record: this issue appears in gvim too. 

  VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct  6 2011 10:20:05)
  Included patches: 1-154
  Huge version with GTK2-GNOME GUI.

  Ubuntu 11.10

Original comment by websch...@gmail.com on 20 Oct 2011 at 8:25

GoogleCodeExporter commented 9 years ago
I did report this to vim_dev but it seems nothing is being done about 
it...there's not really much else that I can do.

Original comment by bjorn.winckler@gmail.com on 20 Oct 2011 at 8:31

GoogleCodeExporter commented 9 years ago
erafal - your writeup is offline, do you have it archived somewhere? I searched 
swayback machine but it's not on there either.

BTW, here is a screenshot of the issue:

Original comment by ivano...@gmail.com on 28 Oct 2011 at 5:00

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Here it is!

http://icy.io/osx/macvim-ruby-balloon-issue/

Original comment by erafal...@gmail.com on 31 Oct 2011 at 1:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Ok if you're using the latest MacVim, this totally works:

" Disable hover tooltips
set noballooneval
let g:netrw_nobeval = 1

If you don't set g:netrw_nobeval, it will overwrite your ballooneval setting.

Original comment by ja...@robotmodehq.com on 3 Feb 2015 at 4:43