Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
Maintain cursor position in window when typing (Using vim on Windows and/or Linux)

When typing text I don't like the way the cursor slowly descends towards the bottom of the screen. Instead I would prefer if the cursor stayed in the same place and the text above the cursor moved up. I know about the 'scrolloff' option and the 'zz' command.

Anyone know how to achieve this behaviour in vim?

share|improve this question

migrated from stackoverflow.com Nov 21 '11 at 19:42

This question came from our site for professional and enthusiast programmers.

marked as duplicate by sblair, JdeBP, Sathya Nov 22 '11 at 11:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

From :help scrolloff: "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)."

share|improve this answer
    
Thanks for the comments Walter. My only problem is that with the scrolloff setting the H, L and M commands don't work properly as it is now impossible for the cursor to be anywhere but in the centre of the screen! –  iorrus mcdonnagh Nov 21 '11 at 17:52