4 ms·
Floating windows is kind of a big deal. Imagine not having a full screen spell check suggestion window, but instead a little context menu that pops up where yo
by nickjj 7y ago
Floating windows is kind of a big deal.
Imagine not having a full screen spell check suggestion window, but instead a little context menu that pops up where you can pick a suggestion while still being able to read the original buffer that you're trying to spell check. Sort of like what Sublime Text had forever.
Or little snippets of helpful text for git specific details or inline documentation for auto-complete.
I've only been using Vim for about 8 months but floating windows is something you severely miss having previously used other editors like VSCode. Now with them in tact, it will unlock all sorts of great features and UI wins. I wonder how long it will take for plugins to start adopting it.
- joeblubaugh 7y agoIs this something that only neovim had? My suggestion plugins in nvim pop over just below the cursor.
- nickjj 7y agoYes, it's only now a feature with Vim 8.2. Edit: Or maybe only "officially" now with the new floating window API instead of having to roll your own code. In any case I really appreciate what Neovim is doing to push Vim into adding features. I hope one day they converge into a single tool.
- riquito 7y agoI don't know the details of 8.2, but floating windows have been possible since a long time (e.g. YouCompleteMe https://github.com/ycm-core/YouCompleteMe https://github.com/ycm-core/YouCompleteMe)
- duskwuff 7y agoCompletion popups were already available, but were specific to completion. They couldn't be used outside that context.
- fmoralesc 7y agoPopup menus have been a thing since long time ago. Nvim floating windows are true arbitrary windows (they are placed in floating layers over other windows and then composited within the grid; in more flexible UIs they can be handled independently); I assume vim 8.2 floating windows are more or less the same.
- Jestar342 7y agoI'm a newbie vim user, but my friends and colleagues that have been using it for years have been professing for years that floating windows are a distraction. That part of vim's appeal is the raw and undisturbed viewport. Not now though. These floating windows are like the second coming.
- donio 7y agoIt's a preference. These have been available for Emacs in various forms for a while but I much prefer side info (from lsp and the like) to pop up in another buffer and only when I ask for it.
- lenkite 7y agoI still know some VIM users who prefer that all completions come in a separate window at the bottom and don't like popups that block their code. For the rest of us normal users though, popup windows are terrific.
- zippie 7y agoWould CTRL+X + CTRL+p/l/f be something akin to this? I use these frequently and have been quite content with their ability to provide in context completion.
- nickjj 7y agoI don't know the inner workings of how it all works but I think with 8.2 there's an official API for floating windows now. Where as before it was up to the plugin author to implement everything about it. There's more details at: https://www.vim.org/vim-8.2-released.php https://www.vim.org/vim-8.2-released.php