In vim8 there is a popup window feature which seems like vscode peek definition. Often I use gF
to go to file with particular line number. Is there a way to open a file in popup window?
1 Answer
You can use any of the popup_*
functions that open popups with a buffer number, so,
let bufnr = bufadd(expand('<cfile>'))
let popup_id = popup_create (bufnr, {})
:set pvp=height:10,width:60 | nno <key> :<c-u>pedit <c-r><c-p><cr>
. Replace<key>
with whatever key sequence you want. See:h preview-popup
and:h c^r^p
.