Skip to main content

Questions tagged [popup]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

How to unlist a terminal buffer opened in a popup window?

I want to unlist a terminal buffer that I open in a popup window. Here are my attempts: var buf_no = term_start(&shell, {'term_name': 'foo', 'hidden': 1, 'term_finish': 'close'}) setbufvar(bufname(...
Barzi2001's user avatar
  • 630
0 votes
0 answers
168 views

How to automatically close a terminal popup window if a python script run in it didn't return any error?

I am wondering if there is a way to automatically close a popup window running a terminal if the execution of the last program didn't report any error and to keep it open if the execution of the last ...
Barzi2001's user avatar
  • 630
0 votes
1 answer
115 views

How to close a terminal popup through some keystroke(s)?

I want to use a terminal in a popup but I am struggling to close it through some keystroke(s). Classic keybindings like <c-w>q or <c-w>c don't work in popups and <c-c> won't close ...
Barzi2001's user avatar
  • 630
-1 votes
1 answer
58 views

Is It Allowed to Assign popup_create() To a Variable?

I know it returns the window ID, but when I run the function that does what's on the question title, it keeps telling me that a 'List is required'. I don't know what's going on. " Check the type ...
Samuel Bacay's user avatar
1 vote
0 answers
22 views

How can I create a popup at a given buffer line and column when the wrap option is set?

When you do popup_create({whatever}, #{ line: m, col: n}), m and n are meant to be screen column numbers, as per :help popup_create-arguments. But what if I want to position the popup at a specific ...
Enlico's user avatar
  • 2,224
0 votes
0 answers
155 views

Popup when writing in insert mode part of a string that has been bound to something else

I recently switched from vim to neovim. I have been struggling with the behaviour of neovim while editing which is at times different from that of vim. I have the following keybinding vim.keymap.set(&...
caffeinemachine's user avatar
0 votes
0 answers
35 views

Popup to show number of matches of a given string while in insert mode, and while completion popup is being shown

This is a follow up to a previous question. Thanks to that, I could come up with this augroup: augroup Foo autocmd! autocmd TextChangedI,TextChangedP * call <SID>foo() fun s:foo() let ...
Enlico's user avatar
  • 2,224
2 votes
1 answer
89 views

Detect when a custom GUI popup menu is visible

I wrote this function to popup a simple menu with each opened buffer as entry: function! PopupBufferList() let menuName = "BuffersList" silent! exec ":aunmenu ".menuName ...
xyx's user avatar
  • 464
1 vote
0 answers
137 views

How to load method definition in a popup?

This is a followup to this question, where I would like to load the method definition in a pop-up rather than a split screen (or the whole screen for that matter). Attempt 1: using nui.vim I’m using ...
abbood's user avatar
  • 743
4 votes
1 answer
84 views

How can I show the syntax-colored current line wrapped on top of current line in nowrap buffer?

I know this can look a lot like a duplicate of Vim wrap only current line, but none of the answers give a real solution to the original problem, as all of them state that per-line soft wrapping is not ...
Enlico's user avatar
  • 2,224
4 votes
1 answer
335 views

Is it possible to scroll a popup via keyboard?

If I do :let id = popup_create(['hello', 'hello', ... a lot of these, 'hello'], {}), I can reproduce the case of a popup that contains more items that its height, thus having a scrollbar. How do I ...
Enlico's user avatar
  • 2,224
0 votes
1 answer
279 views

How to display stdout/stderr of a program as overlay?

How can we display a program execution output from stdout or stderr as a overlay from inside VIM? I get that we can have keyboard shortcut mapping to compile and run, but I'm looking to display the ...
mtk's user avatar
  • 243
1 vote
0 answers
99 views

How to pre-render a terminal buffer before displaying it in a popup

I am currently trying to write my first plugin. So this is my first attempt at vimscript. I want to display the output of a shell command in a popup window. This can easily achieved with: command Cat ...
neolith's user avatar
  • 133
1 vote
1 answer
2k views

nvim popup vs vim popup

I'm planning to write a simple pop-up for myself and I found a nice beginning point for this in this question, but I want to make the code compatible with nvim as well. I can't seem to find a similar &...
fbence's user avatar
  • 677
1 vote
1 answer
43 views

Adjust syntax highlighting of git/mercurial patch within a popup

I have added the following line to my vimrc which allows me to press <leader>p to show the mercurial log with patch for the current line in a popup window. nmap <silent><Leader>p :...
xormapmap's user avatar
1 vote
1 answer
1k views

nvim: how to manually clear popups which do not clear themselves?

While it may not be the only culprit, coc.nvim is a bit notorious for leaving popups hanging around the screen long after they should be cleared. Sometimes, as in the gif below, dangling popups will ...
thisisrandy's user avatar
0 votes
0 answers
58 views

How to get syntax group name of a floating window

I would like to change the font from bold to normal in my floating windows in Vim 8.* I have this script here that gets the syntax group name of the item under cursor. However, this will not work for ...
dman's user avatar
  • 143
1 vote
1 answer
535 views

Can you turn a popup into a regular buffer?

I have a popup / floating window open which is normally used for temporary jobs, like searching the code or opening a quick REPL. Is it possible to turn that into a regular buffer? While I have it ...
TamaMcGlinn's user avatar
40 votes
1 answer
14k views

What are the new "popup windows" in Vim 8.2?

The latest version of Vim, 8.2, has a new feature called "popups" or "popup windows". They sound interesting but I'm not quite sure what they're good for. Can you enlighten me...preferably with some ...
B Layer's user avatar
  • 20k