I recently saw some VIM configuration where search matches would scroll to N lines past the match, so that there would be N lines below the search match instead of it being on the last line (to give context). I cannot find the page where this was mentioned, and apparently I do not know the right keywords to google for!
What is this feature called, and how could I have used the VIM manual to find it assuming that I don’t know what it is called?
Thanks.
As far as I tell this can’t be set just for search, but is a setting that will be used in all situations.
You are looking for
scrolloff: Minimal number of screen lines to keep above and below the cursor. This will make some context visible around where you are working.sidescrolloffdoes the same thing but horizontally.This is what I have in my
.vimrc: