When I quit VIM and open the same file again, I am positioned at the start of the file. How can I preserve the last cursor position?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The "out of the box"
.vimrcenables this with the statement:You may just need to restore this statement in your
.vimrc. In any case, seevimrc_example.vimand also see theline()function in the Vim manual for a discussion of how it works.