8

Is it possible to move to another page in gVim without moving the cursor from its present location?

Splits don't count :)

3 Answers 3

5

No, the way that Vim functions internally (and also due to historical reasons) means that cursor must always be visible.

1
  • 1
    Yeah, suspected as much ... but just, thought I'd check ...
    – Rook
    Commented Jan 21, 2012 at 1:14
7

I do not believe this is possible. You can, however, move the window relative to the current cursor position, while maintaining the cursor on the screen by using zz (move cursor to middle of screen), zt (move cursor to top of screen), and zb (move cursor to bottom of screen). In all of these cases, the cursor position is unchanged, while the window is scrolled around it.

1
  • This is basically the functionality I was looking for. I wish I could hold down a key so that my cursor stayed in the same spot and scrolled line by line with jk.
    – Daniel
    Commented Jun 12, 2023 at 0:30
4

This is not possible AFAIK.

The best you can do is drop a mark.

Or you can press gi. This will place you where you last were inserting text.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .