I am editing at the bottom of a file, but I want the line I'm editing to appear in the middle of the screen. Is this possible without adding a bunch of spurious newlines at the end of the file?


Of course. Just use zz to move current line to the middle of your vim window.

Additionally you can use ctrl-e and ctrl-y to scroll-up and down.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.