annotation trouble

30 views
Skip to first unread message

janezz55

unread,
Dec 7, 2019, 6:05:28 AM12/7/19
to vim_use
I'd like to annotate some code with my annotations and the existing plugins do not fulfill my requirements. I'd like to:

- paint the annotated code with a different color,
- make a popup (like balloon help) when hovering over the annotated code.

How to hack these features into vim? Would I need to fork vim and hack some code into it? Maybe using vim itself as a plugin editor in my application would do the trick?

Christian Brabandt

unread,
Dec 9, 2019, 3:42:54 PM12/9/19
to vim_use

On Sa, 07 Dez 2019, janezz55 wrote:

> I'd like to annotate some code with my annotations and the existing plugins do not
> fulfill my requirements. I'd like to:
>
> - paint the annotated code with a different color,
> - make a popup (like balloon help) when hovering over the annotated code.
>
> How to hack these features into vim? Would I need to fork vim and hack some code into
> it?

This should be possible with a custom plugin. No need for forking Vim
and hack the C source. Have a look at the new popup feature and using
text_properties (or syntax highlighting) for the annotated code.

> Maybe using vim itself as a plugin editor in my application would
> do the trick?

I don't understand that sentence.

Best,
Christian
--
"Gratuliere zur Geburt des Stammhalters! Wie geht es dem Kleinen?" -
"Danke, danke - noch zwei Raten an die Hebamme, dann gehört er uns."

janezz55 .

unread,
Dec 9, 2019, 4:01:47 PM12/9/19
to vim_use
What source files/docs should I look at in the repository? What
language would the plugin be written in?

As for using vim as an editor. This is what vim was meant to do, edit.
But, while we have QScintilla, we don't have a QVim component to embed
in our applications.

V V pon., 9. dec. 2019 ob 21:42 je oseba Christian Brabandt
<cbl...@256bit.org> napisala:
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to a topic in the Google Groups "vim_use" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/dcQdJQmrzq8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20191209204247.GL28132%40256bit.org.

Christian Brabandt

unread,
Dec 10, 2019, 9:53:45 AM12/10/19
to vim_use

On Mo, 09 Dez 2019, janezz55 . wrote:

> What source files/docs should I look at in the repository? What
> language would the plugin be written in?

Vimscript and check the help for popup and syntax highlighting.

> As for using vim as an editor. This is what vim was meant to do, edit.
> But, while we have QScintilla, we don't have a QVim component to embed
> in our applications.

Yes, Vim is an application, not easily embeddable. You can try out
neovim, that allows to embed using the --embed argument.

Best,
Christian
--
Der Baum hat Äste, das ist das Beste. Denn wäre er kahl, dann wär's ein Pfahl.
Reply all
Reply to author
Forward
0 new messages