When I code to the bottom side of screen in vim(in insertmode), how to scroll screen to make line which I’m coding in the middle of screen in insertmode automatically .
Is there any solution? (i know ‘esc+zz+a’ can do that,but can it automatically just as Emacs does )
vim can’t detect that event (code to bottom),does it?
Not sure if it is what you want, but take a look in the
scrolloffoption, which allows you to determine a minimum offset from the bottom of the
window.
If you mean putting the cursor line in the middle of the screen, the
normal command you want is
zz. To access it in insert mode, usecontrol-ozz. You can’t do it automatically
though.
However, an alternative is to set the
scrolloffoption to a very high value(999) and then the cursor line will be always centered on the screen.