I came across a Mac specific application Writeroom for distraction free writing and couldn’t help wonder that good ‘ol vim provides the same features.
One interesting feature was "typewriter scroll mode", in which, the line that you are writing is always in the middle of the screen. At times, while editing long files, I find myself too often at the bottom of the screen at find myself typing zz to redraw the buffer so that the current line is at the middle of the screen. It would be nice to have that as default. A quick search of the vim help revealed:
'scrolloff' 'so' number (default 0)
global
{not in Vi}
Minimal number of screen lines to keep above and below the cursor.
This will make some context visible around where you are working. If
you set it to a very large value (999) the cursor line will always be
in the middle of the window (except at the start or end of the file or
when long lines wrap).
For scrolling horizontally see 'sidescrolloff'.
NOTE: This option is set to 0 when 'compatible' is set.
So, the solution is:
set scrolloff=99
Advertisement
Good to know! Talking about Vim one immediately thinks about Emacs. And voila! There is http://emacs.wordpress.com/2007/09/10/smooth-scrolling/ . Wonder how it compares.
Of course, I have no doubt that something like this exists in emacs also. I don’t really use emacs so I don’t know how it compares