Code Monkey home page Code Monkey logo

Comments (8)

skywind3000 avatar skywind3000 commented on May 16, 2024 4

updated, preview window can scroll now.

from vim-quickui.

skywind3000 avatar skywind3000 commented on May 16, 2024 1

fair, I will look into this later

from vim-quickui.

skywind3000 avatar skywind3000 commented on May 16, 2024 1

important change, since more arguments have been introduced in preview window open function. it is more flexible to organize them in a dictionary, see the documentation for available options:

https://github.com/skywind3000/vim-quickui#preview-window

from vim-quickui.

skywind3000 avatar skywind3000 commented on May 16, 2024

which widget are you referring to? preview window ?

I intentionally made preview window unfocusable, because you do not need to close it manually. The “close” action will actually break your workflow. I don’t want this interruption, so it is unfocusable.

But there is already a

quickui#preview#scroll()

for this and you can map it to alt+f or alt+b to scroll forward or backward without focusing on it.

from vim-quickui.

wookayin avatar wookayin commented on May 16, 2024

Hi @skywind3000, thanks for your comment. Yes, sorry I forgot to say I was referring to preview windows (e.g. quickui#preview#open).

For example, let's imagine a preview windows is opened and one may want to scroll this pop-up window to see more lines. Scrolling mouse wheels would be very intuitive but the focus is lost, and the main window (buffer) scrolls:

2020-01-27 15 38 26

As a comparison, the floating window from coc.nvim or git-messenger is scrollable and focusable, making it easy to navigate and look around:

2020-01-27 15 45 13

And these plugins would also close windows automatically when a cursor (from the original window) is moved. I think this behavior is very intuitive and handy.

from vim-quickui.

wookayin avatar wookayin commented on May 16, 2024

Awesome. Looking at commit d00c435, seems we have the following configurable point:

  • g:quickui_preview_focusable (defaults 1)
  • opts = {'focusable' : 1}

Thank you! Also, could we allow place a cursor on it rather than closing?

from vim-quickui.

leoatchina avatar leoatchina commented on May 16, 2024

Is there any way to judge if a preview popup/floating window exists?
I want to use ctrl+j/k to scroll the preview windows if it appeared, otherwise they should work normally

from vim-quickui.

gluonman avatar gluonman commented on May 16, 2024

This is one of the coolest vim plugins I've encountered, and I love it. I mainly like it as a way to keep visual references, like keybinding cheat sheets and help docs, inside of vim so that I don't feel the need to switch to a browser to google for a reminder of how to do something I haven't done in a while, or opening another terminal to peak into my init.vim to grep for the relevant command and remind myself what I mapped it to. It's also a great addition for anyone trying to build up their vim into an IDE that mimics graphical ones. There are other plugins that allow you to deliver custom content to popups and previews and such, but yours accomplishes this in the way that suits my needs the best, and yours has menus! The first time I installed your plugin and tested out the context menu that I mapped to my right mouse click, I gasped aloud. To see vim do that was something else. So thank you so much for this. But now that I've gotten my praise aside, let me weigh in on this scrollable preview window issue and hopefully justify my request for this feature to be more complete or configurable.

At least for me and my workflow, I actually find the inability to mousewheel scroll or drag a scrollbar up and down within my preview window to be the most damning flaw this plugin has. In my opinion, this plugin is held back from perfection on this one point. For me, it's more of a concern that there isn't a scrollbar than that I can't mousewheel scroll, because if I open the help and want to go down to a section much further down, I don't want to repeatedly hit the keys I mapped quickui#preview#scroll() to for 5 whole minutes, and I only barely like the sound of mouse-scrolling continuously instead for a few minutes. In that situation, a scrollbar is handy to be able to just swing your way halfway down the entire document to get to a much later section, skipping all of the scrolling. And this is an issue because I am entirely unaware of a way to skip to different sections by name within the help preview once the window is open (I have not found the standard '/' search feature to work while the window is open, though maybe there's some conflict between my use of vim-easymotion and being able to search the preview window). When it comes to other content besides the help docs that's much shorter, then mouse-scrolling some times becomes my preferred way to scroll those particular windows. On paper, I like the idea of mouse-free computing, and the more you can do with the keyboard the faster and more efficient your workflow, since you're not moving back and forth. However, that being said, in practice, there are situations in which I honestly do prefer to use the mouse scrollwheel or to click on things. Maybe I have left the terminal window to focus on something else for a bit and I have vim still open, and I just want to swing the cursor into vim to open a reference of some kind real quick and get some info from it, not necessarily get back to writing code just yet. I've been reading and not typing, and my one hand is holding a smoke while the other is comfortably resting on the mouse as I scroll through what I'm reading. I don't want to break that flow just to go back to being all typity-typity again. I want to mouse-scroll my windows. That's the biggest reason I couldn't ever go full ratpoison.

And one more case for at least having the mouse-scrolling be an option that can be toggled on or off, is that there is a use-case for configuring vim to be easier for someone not used to the typity-typity of the vim workflow to transition to working in a terminal environment. I have a couple students whom I am teaching how to Linux and how to CLI, and while I have emphasized for them the power of a more keyboard-focused workflow, I find that for a lot of people tools that maintain both working styles are the best for making transitions, such as the transition from a purely graphical environment to command line interfaces. I have been working to configure my vim into a full-blown IDE reminiscent of a graphical IDE, so I want those intuitive GUI features to be there, like the clickity-clickity and mouse-scrollableness.

Also, I am a bit hung up on this particular screenshot that you have in your manual under preview windows:
preview-window

It has a scrollbar! Have I completely missed a preview window option that enables or disables that scrollbar? I haven't found it in your documentation, and I haven't found any discussion on the scrollbar specifically. It doesn't feel like a broken feature or plugin conflict because when I enable my verbose log, I am unable to find anything related to an element of the preview window failing to load. So I don't know why my scrollbar is missing, but just that it is. The scrollbar in that picture is my only evidence that scrollbars in preview windows are even a thing. How can I enable my scrollbar and make my preview window mouse-scrollable, please?

Cheers

from vim-quickui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.