[Geany] calltips for python?

John Gabriele jmg3000 at xxxxx
Tue Feb 19 18:31:13 UTC 2008


On Feb 19, 2008 8:20 AM, Nick Treleaven <nick.treleaven at btinternet.com> wrote:
> On Mon, 18 Feb 2008 17:52:39 -0500
> "John Gabriele" <jmg3000 at gmail.com> wrote:
> [snip]
>
> > Hm... gets me thinking. Since it could apply to any symbol in general
> > (not just function calls), this sort of feature might be better called
> > "bubbletips" rather than "calltips" (which Geany already seems to
> > have, in some fashion) ...
>
> Can you give some examples?

Ok. But just to be clear: I'm talking about a feature separate,
distinct from, and in addition to calltips. Maybe the name
"bubbletips" is too general, and "symboltips" or "identifiertips", or
something else would be more accurate. Anyways, here's an example:

Use case: User is writing a C source code file and keeps forgetting
what the difference between functions foob1() and foob2().

Solution: User writes a file named `c_mine.tips` and drops it into
`~/geany_tips`. The directory `~/.geany/calltips` contains the tips
that come stock with Geany. The `c_mine.tips` file contains the
following:

=== snip ===
foob1
Only call this when the frobnicator is positive.

foob2
Only call this when the frobnicator is negative.
=== /snip ===

The user then goes to Geany and does "File --> Load tips file..." and
chooses `c_mine.tips`. The tips are now available everywhere (while
editing any file). Perhaps there were check boxes in the "load tips
file" dialog that let you choose to either have the tips work for all
filetypes or specific ones, and the user chose "all filetypes".

Now the user is editing, types "foob1" and -- with the cursor
somewhere in the foob1 string (or at either end) -- hits a key-combo
that makes a bubble pop up which says "Only call this when the
frobnicator is positive.". After that, they might then hit the key
combo to get the calltip for foob1.

> It sounds interesting, but for now we will probably stay with the
> current system.

Enrico's idea for doing it as a plug-in sounds good. I probably will
not do it at the moment. Also, I took a quick peek at plugindata.h
(and the geanylua ref doc) and didn't see anything in there about
bubbles or popup help.

---John



More information about the Users mailing list