Loading ...
Sorry, an error occurred while loading the content.

59601Re: How to add Tooltips in VIM

Expand Messages
  • Eric Arnold
    Jun 1, 2005
      Hmm. In :help balloon-eval which brings up debugger.txt it says:
      Balloon evaluation is only available when compiled with the
      |+balloon_eval| and |+sun_workshop| features.

      and :help ballooneval describing the option setting it also says,
      {only available when compiled with the |+balloon_eval|
      and |+sun_workshop| or |+netbeans_intg| features}

      I didn't find much about how to actually use "balloons", except in
      netbeans.txt, which requires the sun compile options. There is, however,
      information on using Tooltips, via "tmenu" etc. The tooltips seem to
      be used and defined for the W32 and X11 GUI vim toolbar with tmenu
      (and for other popup menus, but I haven't tried that yet). However, the
      functions from netbeans.txt seem to imply the ability to create
      balloons in general text areas (sort of, but "not implemented"?):

      showBalloon text
      Show a balloon (popup window) at the mouse pointer position,
      containing "text", a string argument. The balloon should
      disappear when the mouse is moved more than a few pixels.

      balloonEval off len type
      The mouse pointer rests on text for a short while. When "len"
      is zero, there is no selection and the pointer is at position
      "off". When "len" is non-zero the text from position "off" to
      "off" + "len" is selected.
      Not implemented yet.

      So, I think balloons and tooltips aren't exactly synonymous. Even though

      returns "1" the actual balloon commands aren't accessible, though the
      tooltips (and "tmenu") which apparently use some of the balloon
      functionality are? Is any of this correct?

      What would be cool would be to create a tooltip for a text region, as with
      syntax highlighting, but I don't see anything for that. This would make
      scripted applications which rely on "normal" mode (as opposed to
      [tear-off]menus) much easier to provide hints and help.

      --- "A. J. Mechelynck" <antoine.mechelynck@...> wrote:

      > Eric Arnold wrote:
      > > All the WinXP versions I have don't include the sun workshop, which seems
      > to be
      > > where the balloons are. Is it true that you need to have a Unix version or
      > > compile your own to use the balloons?
      > >
      > > --- "A. J. Mechelynck" <antoine.mechelynck@...> wrote:
      > AFAIK, all you need is a version compiled with the +balloon_eval
      > feature, i.e.,
      > :version
      > includes +balloon_eval ;
      > :echo has("balloon_eval")
      > answers 1.
      > For Windows, see my Vim page
      > http://users.skynet.be/antoine.mechelynck/vim/ from which recent
      > versions of both gvim 6.3 and gvim 7.00aa can be downloaded. My GUI
      > versions (gvim.exe and gvimd.exe) but not my console versions (vim.exe
      > and vimd.exe) have +balloon_eval compiled-in.
      > Please read the accompanying text before downloading.
      > Best regards,
      > Tony.
    • Show all 14 messages in this topic