How To Change Cursor-position-based Window Scrolling In VIM

Author: , September 30th, 2011

To force VIM to keep the cursor vertically centered in the window while the text scrolls, place this directive in your ~/.vimrc file:

To disable it, comment the line out with a double-quote or remove it completely: