Tim
Tim

Reputation: 14164

How to scroll in insert mode?

Is there a default key for scrolling in insert mode? I know that I could just

:imap <F5> <ESC><C-e>a
:imap <F6> <ESC><C-y>a

but I'm wondering if there's any key binding there by default.

Upvotes: 4

Views: 2177

Answers (2)

glts
glts

Reputation: 22734

For completeness, there are two dedicated commands for scrolling in insert mode, CTRLXCTRLE and CTRLXCTRLY. They are probably the proper ones to map.

See the documentation here: :h i_CTRL-X_CTRL-E.

In normal mode CTRLE and CTRLY do the same thing, I use them quite often.

Upvotes: 14

kev
kev

Reputation: 161954

In insert mode, type Ctrl-o, then type zz.
It'll set current line in the middle of the screen.

Actually, you can type any command.

Upvotes: 6

Related Questions