Popup windows mostly done

109 views
Skip to first unread message

Bram Moolenaar

unread,
Aug 31, 2019, 10:12:29 AM8/31/19
to vim...@googlegroups.com

The popup window feature has been implemented. Only a few minor things
remain.

So this is a good time to try out popup windows, find any problems and
missing features. The best way is to try implementing what you want do
do with popup windows.

Please read the help at ":help popup" and check it out.

--
hundred-and-one symptoms of being an internet addict:
148. You find it easier to dial-up the National Weather Service
Weather/your_town/now.html than to simply look out the window.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Dominique Pellé

unread,
Aug 31, 2019, 11:37:43 AM8/31/19
to vim_dev
Bram Moolenaar wrote:

> The popup window feature has been implemented. Only a few minor things
> remain.
>
> So this is a good time to try out popup windows, find any problems and
> missing features. The best way is to try implementing what you want do
> do with popup windows.
>
> Please read the help at ":help popup" and check it out.

Some doc corrections attached.

Regards
Dominique
fixes-doc-popup-8.1.1950.diff

Bram Moolenaar

unread,
Aug 31, 2019, 12:11:33 PM8/31/19
to vim...@googlegroups.com, Dominique Pellé
Thanks!

--
hundred-and-one symptoms of being an internet addict:
150. You find yourself counting emoticons to get to sleep.

Paul Jolly

unread,
Sep 5, 2019, 5:47:58 AM9/5/19
to Vim Dev Mailing List
> The popup window feature has been implemented. Only a few minor things
> remain.

Thanks again for all the work on this, Bram.

We're just about to fully switch to popups i.e. upgrade min version of
Vim required for govim with no fallback option to use balloons/other.
No problems seen so far, works really well.

And we're just about to use the completeopt+=popup support with the
completepopup=align:menu option to bolster the completion side of
things.
Message has been deleted

Christian Brabandt

unread,
Sep 5, 2019, 11:01:23 AM9/5/19
to vim...@googlegroups.com

On Sa, 31 Aug 2019, Bram Moolenaar wrote:

> Please read the help at ":help popup" and check it out.

I haven't had a look at it yet. However I would be interested to know of
any plugins making use of it already. So please showcase some scripts ;)

Best,
Christian
--
Alles fließt und nichts bleibt.
-- Heraklit von Ephesus (540-480 v. Chr.)

Blay263

unread,
Sep 5, 2019, 11:02:11 AM9/5/19
to vim_dev

Paul Jolly

unread,
Sep 5, 2019, 11:03:27 AM9/5/19
to Vim Dev Mailing List
If anyone is planning on working on this, creating something via
asciinema would be a nice way of getting the visualisation for free.
The entire set of examples could be coded with timings, then "played"
with asciinema recording.

On Thu, 5 Sep 2019 at 15:58, Blay263 <tate...@gmail.com> wrote:
>
> Are you still planning a showcase. https://groups.google.com/forum/m/#!searchin/vim_dev/Popup/vim_dev/o1rzzF5nCRw
>
> --
> --
> You received this message from the "vim_dev" 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 the Google Groups "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/b6a3b170-cba4-4617-bb3b-5374f0ca97c6%40googlegroups.com.

Blay263

unread,
Sep 5, 2019, 11:04:29 AM9/5/19
to vim_dev
You read my mind lol

Bram Moolenaar

unread,
Sep 5, 2019, 3:29:37 PM9/5/19
to vim...@googlegroups.com, Blay263
I enabled the wiki on github and added a first page:
https://github.com/vim/vim/wiki

Let's see how it goes.

--
What is the difference between a professional and an amateur?
The ark was built by an amateur; professionals gave us the Titanic.

Pete Doherty

unread,
Sep 5, 2019, 4:13:33 PM9/5/19
to vim_dev
First off, I'm really looking forward to this feature and seeing how it'll be used in the wild.

Is the list of "only a few minor things" documented somewhere? I've noticed a few small issues, but don't want to add noise if they're already known. For instance, I don't seem to be able to make popups draggable or resizeable (patch 8.1.1944).

Bram Moolenaar

unread,
Sep 5, 2019, 4:41:31 PM9/5/19
to vim...@googlegroups.com, Pete Doherty

> First off, I'm really looking forward to this feature and seeing how it'll
> be used in the wild.
>
> Is the list of "only a few minor things" documented somewhere? I've noticed
> a few small issues, but don't want to add noise if they're already known.
> For instance, I don't seem to be able to make popups draggable or
> resizeable (patch 8.1.1944).

You need to enable that with "resize" and "drag".

--
hundred-and-one symptoms of being an internet addict:
195. Your cat has its own home page.

Nick Jensen

unread,
Sep 5, 2019, 6:27:17 PM9/5/19
to vim...@googlegroups.com
The 2019-09-05 21:29, Bram Moolenaar wrote:
> I enabled the wiki on github and added a first page:
> https://github.com/vim/vim/wiki

@bfrg has added his plugin
[vim-qf-preview](https://github.com/bfrg/vim-qf-preview) to the wiki.

You apparantly can't add embedded asciinema animations to github wikis
unfortunately, so it's just a screenshot.

I'm currently using this plugin and find it extremely useful.

Pete Doherty

unread,
Sep 6, 2019, 1:03:46 AM9/6/19
to vim_dev
> You need to enable that with "resize" and "drag".

I've done that, but it's very possible I'm overlooking something or my environment is quirky. I've tried opening vim in/out of tmux, with/out a .vimrc and almost every variation of the optional configs I can think of. I'm using Debian 10, i3 version 4.16.1 and vim patch 8.1.1944.

Yegappan Lakshmanan

unread,
Sep 6, 2019, 1:21:58 AM9/6/19
to vim_dev
Hi,

On Thu, Sep 5, 2019 at 10:03 PM Pete Doherty <pdohe...@gmail.com> wrote:
>
> > You need to enable that with "resize" and "drag".
>
> I've done that, but it's very possible I'm overlooking something or my environment is quirky. I've tried opening vim in/out of tmux, with/out a .vimrc and almost every variation of the optional configs I can think of. I'm using Debian 10, i3 version 4.16.1 and vim patch 8.1.1944.
>
> Here's a screencap of the behavior I see: https://www.dropbox.com/s/ooc18fc0hmzi5ej/vim-popup-resize-drag.ogv?dl=0
>

It looks like 'mouse' is not enabled. Can you try setting 'mouse' to 'a'?

- Yegappan

Bram Moolenaar

unread,
Sep 6, 2019, 9:47:35 AM9/6/19
to vim...@googlegroups.com, Pete Doherty

> > You need to enable that with "resize" and "drag".
>
> I've done that, but it's very possible I'm overlooking something or my
> environment is quirky. I've tried opening vim in/out of tmux, with/out a
> .vimrc and almost every variation of the optional configs I can think of.
> I'm using Debian 10, i3 version 4.16.1 and vim patch 8.1.1944.
>
> Here's a screencap of the behavior I see:
> https://www.dropbox.com/s/ooc18fc0hmzi5ej/vim-popup-resize-drag.ogv?dl=0

The command is right, and it works for me. Thus there is something wrong
with mouse events in your setup. Probably drag events don't work.
I have seen that with some terminal emulators.

--
Some of the well known MS-Windows errors:
EHUH Unexpected error
EUSER User error, not our fault!
EGOD Horrible problem, god knows what has happened
EERR Errornous error: nothing wrong

Prabir Shrestha

unread,
Sep 8, 2019, 2:45:37 PM9/8/19
to vim_dev
vim-lsp uses the new popup window a lot. https://github.com/prabirshrestha/vim-lsp

Signature help: https://github.com/prabirshrestha/vim-lsp/pull/479

terminal7

We also use it for hover to find information about the word under cursor. https://github.com/prabirshrestha/vim-lsp/pull/441
image


image

Is there an equivalent for CursorMoved but MouseMoved instead so we can auto open the popup window? MouseMoved would definitely need some sort of debouning.

Bram Moolenaar

unread,
Sep 8, 2019, 3:04:40 PM9/8/19
to vim...@googlegroups.com, Prabir Shrestha

Prabir Shrestha wrote:

> vim-lsp uses the new popup window a lot.
> https://github.com/prabirshrestha/vim-lsp
>
> Signature help: https://github.com/prabirshrestha/vim-lsp/pull/479
>
> We also use it for hover to find information about the word under cursor.
> https://github.com/prabirshrestha/vim-lsp/pull/441
>
I'm glad you can use the new functionality.

> Is there an equivalent for CursorMoved but MouseMoved instead so we can
> auto open the popup window? MouseMoved would definitely need some sort of
> debouning.

You can use the balloon eval feature, see ":help popup_beval_example"
for an example.

--
hundred-and-one symptoms of being an internet addict:
222. You send more than 20 personal e-mails a day.

Yee Cheng Chin

unread,
Sep 8, 2019, 10:43:46 PM9/8/19
to vim_dev
Maybe off topic, but I kind of wish vim.wasm is mature enough that you can use it to host interactive live demos on a webpage. This way you can see the demo, then try it out without having to pull the plugin and update Vim to latest version, etc.


On Thursday, September 5, 2019 at 8:03:27 AM UTC-7, Paul Jolly wrote:
If anyone is planning on working on this, creating something via
asciinema would be a nice way of getting the visualisation for free.
The entire set of examples could be coded with timings, then "played"
with asciinema recording.

On Thu, 5 Sep 2019 at 15:58, Blay263 <tate...@gmail.com> wrote:
>
> Are you still planning a showcase. https://groups.google.com/forum/m/#!searchin/vim_dev/Popup/vim_dev/o1rzzF5nCRw
>
> --
> --
> You received this message from the "vim_dev" 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 the Google Groups "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages