Vim Cheat Sheet for Navigation

Go to top of the file: gg

Go to Bottom of the file: G

Go to last line of the current screen: L

Go to middle of the current screen: M

Go to the first line of the current screen: H

Go to Middle of the screen and bring that line to top: Ctrl+d M

Go to last line of the screend and bring that line in the middle of the screen: Lzz

Go to a specific line: <line number gg> for example 10gg will take you to the 10th line in the file.

Get current line in the center of the screen: zz

Get current line on the top of the screen: zt

Get current line on the bottom of the screen: zb

Keep the cursor on the current line and move the sereen up: Ctrl+e

Keep the cursor on the current line and move the screen down: Ctrl+y

Go half screen Down: Ctrl+d

Go half screen Up: Ctrl+u

Go one screen Down: Ctrl+f

Go one screen Up: Ctrl+b

Go to the begining of the line: 0

Go to the end of the line: $

Go to the first non blank character: ^

Go to the last non blank character: g_

Go to the begining of next word: w

Go to the end of next word: e

Go to the previous word: b

Go N% down in the file: <number>% for eg: 20% will take the cursor down to 20% from the top of the file.

Find all occurences of the word under the cursor: *

Setting up the mark: m<reg-name> for eg mn your mark will be set into the register n. If you want to go back to that line number the key strokes are `n.