Avoiding the edges when scrolling in Vim
When scrolling in Vim, we eventually hit the top/bottom edge of our screen with our cursor. Vim has an option which allows us to always have some lines above the cursor when hitting the top of the screen or underneath when hitting the bottom:
set scrolloff=5
This gives us a five line "border" when scrolling against the edges.
Written by Dan Croak
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#