Skip to main content

Navigating in Vim

Intro to basic Vim movements

Moving the cursor

  • Vim motions: {count}{motion}
  • horizontally: l, h, w, b, W, B, $, ^, 0
  • vertically: k, j, {, }, …
  • to a line: gg, G, {line number}gg, {line number}G, :{line number}
  • to a character on the same line: f{char}, F{char}, t{char}, T{char}, ”;”, ”,”
  • o = in visual mode, jump to other end of selection (to adjust where it starts or ends)

Moving the scroll position

  • cursor vertically centered: zz
  • move cursor within current scroll position: H, M, L
  • scroll down/up: c-d, c-u
  • arranging windows: c-w s, c-w v, c-w q, c-w c, c-w o, c-w r, c-w x, c-w =, c-w _
  • jumping between windows: c-w w, c-w h, c-w j, c-w k, c-w l

Inbox