Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Vim8.1 popup feature #30

Open
rhysd opened this issue May 29, 2019 · 14 comments
Open

Use Vim8.1 popup feature #30

rhysd opened this issue May 29, 2019 · 14 comments
Assignees

Comments

@rhysd
Copy link
Owner

rhysd commented May 29, 2019

https://github.com/vim/vim/blob/master/runtime/doc/popup.txt

It seems about to be being implemented. If it works and sufficient for this plugin, using it would be better for Vim users.

@rhysd rhysd self-assigned this May 29, 2019
@airblade
Copy link

airblade commented Sep 2, 2019

As far as I understand a popup window cannot be focused so it wouldn't be possible to use the mappings etc.

@rhysd
Copy link
Owner Author

rhysd commented Sep 2, 2019

Yeah, the point is a blocker. Currently I don't have good idea to workaround that.

@airblade
Copy link

airblade commented Sep 2, 2019

I think if the user wants to use popups to see the blame info, it's useful even if they can't do anything with it. I suppose you can make the popup as big as the blame info, up to the size of the window, to minimise scrolling.

@rhysd
Copy link
Owner Author

rhysd commented Sep 2, 2019

Current implementation determines size of float window following contents. However, sometimes commit body is too big. And if user wants to see diff of the commit, it would be not fit to window (diff is usually bigger).

Another point is local key maps in the float window. This plugin provides some mappings such as o (show older commit). I also don't have good idea to provide the mappings without focusing (entering) a popup. Neovim's float window allows to move cursor into popup, so we can define window-local mappings. But that seems not available in Vim.

@blayz3r
Copy link

blayz3r commented Sep 18, 2019

vim/vim#4577
mhinz/vim-signify#302

@tracyone
Copy link

tracyone commented Oct 7, 2019

:help previewpopup

@blayz3r
Copy link

blayz3r commented Nov 15, 2019

bump

@tsuyoshicho
Copy link

I think operation likely that.
bfrg/vim-qf-preview: Vim plugin to preview current quickfix item in a popup window (Vim-only)

(skip into preview; direct operation.)

@sheerun

This comment has been minimized.

@rhysd

This comment has been minimized.

@blayz3r
Copy link

blayz3r commented Aug 6, 2020

nmap <silent><Leader>g :call setbufvar(winbufnr(popup_atcursor(split(system("git log -n 1 -L " . line(".") . ",+1:" . expand("%:p")), "\n"), { "padding": [1,1,1,1], "pos": "botleft", "wrap": 0 })), "&filetype", "git")<CR>

image

co -> https://www.reddit.com/user/sheerun/

@nickjj

This comment has been minimized.

@rhysd
Copy link
Owner Author

rhysd commented Aug 9, 2020

All right, I'll make time to try to implement this feature this week.

@blayz3r
Copy link

blayz3r commented Oct 5, 2020

Discussion here:
vim/vim#5639 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants