How can Vim be configured to automatically centre a specified line number (eg. without manually having to use the zz
command?
So from the commandline I just want to issue:
vim verylongfile.c +932
...and as soon as the file opens, the line is visible in the centre of the screen.
I remember (fondly) this being a default setting on Fedora Core 4's shipped copy of vim.
On my work PC, vim does it the way I want by default. At home, my vim tends to put the line at the bottom of the screen, which gets annoying when wanting to view code and the context around it while flipping between files a lot.
Both machines have the same .vimrc file in the user's home directory. Bothe systems have recent versions of vim (from up-to-date apt and yum repositories).
Is there a magic incantation I can add to the .vimrc to for this apparently optional behaviour all the time by default?