1

I tried to use the "scroll-smooth" tip given in :h tips (see :h scroll-smooth).

The idea is to change <C-U> by a series of <C-Y>'s (and the same for <C-D> with <C-E>'s) :

map <C-U> <C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y>
map <C-D> <C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E>

However it works only when I split to another window inside my running VIM, as if creating a buffer was necessary. The smooth scrolling works only in the second window, not the first one.

If I open another tab (:tabf myfile), the mapping fails again ; if I split this second tab using :vs, the mapping works... again only in the second window.

I tried to check :map <C-U> as advised in this post, but it gives a satisfying result :

<C-D> <C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E>

Edit

Just to be clearer, when I say that it does not work, I mean that the screen is moved N lines down or up, but not with the expected "smoothing" effect.

@Nobe4, I tried with vim -Nu NONE, issuing command map <C-D> <C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E>. Again, when pressing CtrlD, the screen is moved a few lines down but without the smoothing effect.

Feffe
  • 1,761
  • 2
  • 14
  • 21

0 Answers0