Questions tagged [popup]
The popup tag has no usage guidance.
18
questions
0
votes
0
answers
44
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 ...
0
votes
1
answer
54
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 ...
-1
votes
1
answer
50
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 ...
1
vote
0
answers
18
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 ...
0
votes
0
answers
90
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(&...
0
votes
0
answers
30
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 ...
1
vote
1
answer
50
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
...
0
votes
0
answers
71
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 ...
4
votes
1
answer
79
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 ...
3
votes
1
answer
157
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 ...
0
votes
1
answer
209
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 ...
1
vote
0
answers
92
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 ...
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 &...
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 :...
1
vote
1
answer
883
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 ...
0
votes
0
answers
56
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 ...
1
vote
1
answer
459
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 ...
39
votes
1
answer
13k
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 ...