Instead, vim scrolls the view by one full page, making it very difficult to follow a long line of code.
Line wrapping is of course disabled, and we want to just use the arrow keys and not zl
.
Is there a vim option for configuring in .vimrc the desired behavior?
You just press z once in order to trigger the "horizontal scrolling mode", which stop as soon as you press any other key.
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).
Set the overflow-y: hidden; and overflow-x: auto; that will automatically hide the vertical scroll bar and present only the horizontal scrollbar. The white-space: nowrap; property is used to wrap text in a single line. Here the scroll div will be horizontally scrollable.
Terminals are not designed to scroll horizontally. Use less -S to allow scrolling left and right as well as up and down.
You're looking for
:set sidescroll=1
(or any other small number). The default is 0
, which scrolls by half a screen. See also sidescrolloff
for how near the cursor must come to the border to trigger scrolling.
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