Say, I split my Vim screen into two windows. And I need to scroll inactive window. Example to scroll up/down preview window without placing a cursor into preview window.
You can make Vim scroll the text using the shifted up/down arrows by mapping Shift-Up to Ctrl-Y and Shift-Down to Ctrl-E. Shift-Down will then scroll down (like moving a scroll-bar down, or like moving a cursor at the bottom of a window down), and Shift-Up will then scroll up (like moving a scroll-bar up, etc).
You could add a couple of custom mappings:
:nmap ,d <C-W>W<C-D><C-W>W
:nmap ,u <C-W>W<C-U><C-W>W
and then use ,d
and ,u
to scroll down and up in the other window.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With