News for hackers. Stuff that matters.
Re:History and effective use of Vim (2019) by pge on Friday July 29, 2022 @09:58AM (#32276956)
H, M, and L will move the cursor to the top, middle and bottom (respectively) of the screen. That is, H moves the cursor to the top visible line on the screen, L to the last line currently visible, and M to the middle. Cursor moves but text does not.

zt, zz, and zb are similar but move the text not the cursor. So, zt will take the current line the cursor is on and make it the first visible line on the screen (and keep the cursor on that line). zz to the middle, zb to the bottom.

Personally, I use [ and ] to jump around most often in code, but the above are handy when you are working with documents.

There are no comments on this comment yet.