Leo Zhang
Leo Zhang

Reputation: 3230

how to remap a key to scroll half page up in vim?

By default, pressing Ctrl+D will scroll half page up.

I'd like to remap Ctrl-E to scroll half page up such that it's easy to scroll page up and down with just Ctrl-E and Ctrl-D.

How to do that?

Upvotes: 2

Views: 1220

Answers (1)

Kent
Kent

Reputation: 195039

This line will do it:

nnoremap <c-e> <c-u>

But you will lose the original function of C-E, which I think is pretty useful with C-Y too.

I suggest you get used to Ctrl-D(own) and Ctrl-U(p).

Upvotes: 5

Related Questions