fman-users / fman

Issue tracker for fman, a cross-platform file manager
https://fman.io
240 stars 3 forks source link

Scrolloff option #186

Open kalons7 opened 7 years ago

kalons7 commented 7 years ago

Would ensure that there are always a certain number of lines visible above and below the selected file/folder when scrolling. Is this possible via a plugin?

See here for Visual Studio Code implementation. https://marketplace.visualstudio.com/items?itemName=tickleforce.scrolloff

mherrmann commented 7 years ago

I'm not familiar with scrolloff, but briefly looked it up now. I'm pretty certain it's not possible to do this with the current plugin API. Do I understand correctly that the goal is for the scrolling to change as the cursor is moved?

kalons7 commented 7 years ago

Yes, it would keep rows visible above/below the selection while scrolling (for long folder/file lists), similar to many editors. XYplorer supports this (referred to as scroll margin).

On Mon, Jun 26, 2017 at 11:11 PM, Michael Herrmann <notifications@github.com

wrote:

I'm not familiar with scrolloff, but briefly looked it up now. I'm pretty certain it's not possible to do this with the current plugin API. Do I understand correctly that the goal is for the scrolling to change as the cursor is moved?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fman-users/fman/issues/186#issuecomment-311254791, or mute the thread https://github.com/notifications/unsubscribe-auth/AcTlFBpV8ZC358tfyML-bLhGSBcUQzP1ks5sII7-gaJpZM4OFjOb .

mherrmann commented 7 years ago

Okay, thank you for the clarification!

tobia commented 5 years ago

To be clear:

This is especially useful when selecting files with Shift+arrow, because without a scroll offset, you never know when to stop selecting. You have to either use the mouse wheel every time the cursor reaches the bottom of the window; or over-select and then de-select the additional files.

Notice that the scroll offset goes down to zero near the beginning or end of the list. That's how you know you have reached the end, because the scroll offset is gone.

You can quickly see how it works by opening Vim on a source code file, set the option with :set scrolloff=3+Enter and then scroll around with the arrows. (To quit Vim type Esc+:q+Enter.)