5

What I've tried is a exe ':'.pupid.'windo norm! zi' however the command fails upfront with and 'Invalid range` error. The pupid is being obtained via popup_findpreview() and is correct. That's because popup_findpreview() gives you a window ID, but the range passed to :windo expects window numbers: :[range]windo {cmd} Execute {cmd} in each window or if [...


3

The border depends on 'encoding' and 'ambiwidth'. From the docs: By default a double line is used all around when 'encoding' is "utf-8" and 'ambiwidth' is "single", otherwise ASCII characters are used. In your case ASCII characters are used. If you programmed the popup yourself, see :h popup and search for borderchars. BTW: I don't think that fzf is ...


2

If you look at the help for the :pedit command, you will see this: :ped :pedit :ped[it][!] [++opt] [+cmd] {file} Edit {file} in the preview window. The preview window is opened like with :ptag. The current window and cursor position isn't changed. Useful example: ...


2

I've had some success by creating the popup window without focus: let m = range(50) \ ->map({_, i -> string(i)}) \ ->popup_create(#{ \ line: 1, \ col: 1, \ minwidth: 1, \ minheight: 1, \ maxheight: &lines - 1, \ cursorline: 1, \ wrap: 0, \ firstline: 1, \ scrollbar: ...


2

I tried using windo set scrollbind, but this doesn't work on a popup window (as far as i know). It cannot work because :windo only works on windows which have a number; popup windows don't. Any ways to do this? OTOH, popup windows do have an ID. So, you could try: call win_execute(winid, 'setlocal scrollbind') Or: call setwinvar(winid, '&scrollbind',...


2

Try to limit the height of the popup, at least 1 line less than the height of the terminal window, by including this key in the options dictionary passed to popup_create(): maxheight: &lines - 1 For example: call range(50) \ ->map({_, i -> string(i)}) \ ->popup_create(#{ \ line: 1, \ col: 1, \ minwidth: 1, \ ...


1

A popup window in Vim is a "floating" window, so it actually covers the current windows and the text in them. You can set the line, column and adjust min/max width and height to have a popup cover the left or the right half of the screen. For example, for a popup covering the left half of the screen: let winid = popup_create('popup', { \ 'line':...


1

Your example is trying to mimic popup menu by popup window, it's complicate, I changed it to use arrow keys to scroll popup window in normal mode, it's only purpose is to show you how to change cursor in popup window: noremap <buffer> <down> :call Omni_cursor(1)<CR> noremap <buffer> <up> :call Omni_cursor(0)<CR> noremap &...


1

The highlight group used to style the current argument is called YCMInverse, since its default is to reverse foreground and background colors. Its default is defined here as: hi default YCMInverse term=reverse cterm=reverse gui=reverse Since it's defined using hi default, you can override it by setting your own from your vimrc. For example, to highlight ...


Only top voted, non community-wiki answers of a minimum length are eligible