3 votes

Scrolling issues when the `wrap` option is set

There is hope! A new option 'smoothscroll' was added to Vim in version 9.0.0640, to allow nicer scrolling with soft-wrapped lines. The bad news is that it currently1 doesn't support the gj and gk ...
Rich's user avatar
  • 31.7k
2 votes

Don't use scrolloff=5 for mouse clicks

One of the beautiful things about Vim is that often this kind of customisation is not only possible, but relatively straightforward: function! DisableScrollOff() abort " Save the current ...
Rich's user avatar
  • 31.7k
1 vote
Accepted

Can you prevent then screen jumping when toggling the wrap option?

It is not always possible to achieve the desired output since the first window row is always the start of a line (if smoothscroll is not set) Suppose you have that text (with cursor at row 2): 2 line ...
Vivian De Smedt's user avatar
1 vote

Scroll Lock in Vim

Use the scrolloff setting and set it to a value larger than half the window height I think you'll get the behavior you really want. :set scrolloff=999 In this mode both normal navigation keys (j, k) ...
idearat's user avatar
  • 11
1 vote

Visual scrolling/visual <C-e> and <C-y> across wrapped lines?

A new option 'smoothscroll' was added to Vim in version 9.0.0640, to allow nicer scrolling with soft-wrapped lines. As of around May 2023, the documentation includes this proviso: NOTE: only partly ...
Rich's user avatar
  • 31.7k
1 vote

How to disable horizontal scrolling?

On neovim, there is now a global option to disable horizontal scrolling: mousescroll = "ver:1,hor:0"
Adrian Lopez's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible