I recently started using Vim to write my notes after moving away from VS Codium for this. I'm really enjoying the speed and the ability to navigate keyboard only, but there is one thing that is slightly annoying and I was wondering if there is already a solution.
I understand that scrolloff
will keep space above and below a cursor but this is when scrolling through a file. It doesn't work when typing. I understand that zz
will recenter the file on the cursor position and that Ctrl-e
moves down one line. So when I'm writing and I'm reaching the end of the file, I could zz
or Ctrl-e
to adjust the position. However, I was wondering if there was a way to automate this, something like:
if (eof - :.) < 5
zz
Or something along those lines?