Skip to content

floating :pedit (Vim's :help preview-popup) #9920

@mwesterhof

Description

@mwesterhof

First of all, sorry if this has been suggested before, I haven't found anything about it, but there's a lot of issues on here regarding floating windows, and it's a tricky subject to search...

I recently wrote a short blog article about a simple, generic workflow tweak that leverages floating window support. In short, I really liked the idea of using floating windows on top of (both literally and figuratively) regular split windows. It would basically allow me to toggle an additional floating window that i could use for whatever buffer (scratch, terminal, any file) I wanted at the time. This allows for a lot of flexibility in my workflow. The article shows a very simple (and quite hacky) plugin, that implemented this the way i pictured it.

I linked this article on the subreddit, and I was asked to open an issue regarding my suggested workflow. For completeness sake, this is how I described it in the article:

  • one simple keyboard mapping that shows a floating window over all the other split windows
  • by default, it will simply show the buffer that was active when using the keyboard mapping
  • opening other files, loading other buffers etc. should work the same as always (vim-vinegar is excellent for this)
  • this floating window can be closed normally, or by hitting the mapping again
  • closing the window won't actually delete the buffer, and when hitting the mapping again, will pull up the buffer you last looked at

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreNvim core functionality or codefloatwinfloating windows, popups, hoverhas:vim-patchissue is fixed in vim and patch needs to be ported

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions