Monday, June 29, 2015

Changing buffer changes display area

I have two buffers open on two different files. In buffer 1, I go to the bottom with G, and zz to put the cursor into the middle, and see the ~'s in the bottom half of the window. I swap to buffer 2 with :bn. I swap back with :bp. Vim has 'optimised' the display area by moving the bottom line of the file to the bottom of the window. I would like it to keep it in the middle, or wherever I had put it. Is it possible?

When I search for this online, I see only results for moving the cursor position with startofline, nothing about keeping the displayed area as it was.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment