I know that gg
and G
can move the cursor to the top and bottom of the file. But is there a way to jump to the top or bottom of the visible window?
-
Capital H does not work for me. I'm using Linux ubuntuxfr 5.4.0-77-generic #86~18.04.1-Ubuntu SMP Fri Jun 18 01:23:22 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux i can only get the cursor within 5 or sometimes 6 lines from the top of the window ( unless i'm editing one of the very first lines in the file ). Other distros i've used in the past did not have this issue. thoughts ?– ochoaJul 18, 2021 at 23:11
-
@ochoa your "Answer" was not an answer to the question. We use those only to provide an answer to the original question. If you have a question, you may follow up with a comment to clarify something or ask a new question. See also How to Ask,How to Answer.– D. Ben Knoble ♦Jul 19, 2021 at 15:28
1 Answer
Type H (capital H, H for "high") to move to the top of the screen.
Type M (capital M, M for "middle") to move to the middle of the screen.
Type L (capital L, L for "low") to move to the bottom of the screen.
-
4Since
j
moves down andk
moves up, it's a little awkward thatJ
andK
don't make these top/bottom movements. Is there a mnemonic to remember these by, similar toM
for "middle" like @Caco points out? Mar 4, 2020 at 3:02 -
4
-
1
-
1@Marcio I also edited the answer to include the mnemonics, since you were not the only one to comment on it... Thanks for your contribution and welcome to the site!– filbranden ♦May 28, 2021 at 16:32