Skip to content

Instantly share code, notes, and snippets.

@bostonaholic
Created April 21, 2011 03:46
Show Gist options
  • Save bostonaholic/933677 to your computer and use it in GitHub Desktop.
Save bostonaholic/933677 to your computer and use it in GitHub Desktop.
VIM

VIM MOVEMENT

BASIC Movement (Screencast 1)

h - left j - down k - up l - right

0 - end of line $ - start of line

w - next word W - next word by whitespace e - end of next word E - end of next word by whitespace b - beginning of previous word B - beginning of previous word by whitespace ge - end of previous word gE - end of previous word by whitespace

f<char> - next

  • repeat with ; F<char> - previous
  • repeat with ; t<char> - until
  • repeat with l; T<char> - previous until
  • repeat with l;

BASIC Movement (Screencast 2)

^f - forward full page ^b - backward full page ^u - up half page ^d - down half page

H - head of screen M - middle of screen L - last of screen

gg - top of file G - bottom of file <num>G - line

* - search forward current word # - search backward current word g* - search forward current word without word boundary g# - search backward current word without word boundary

/<str> - search forward for ?<str> - search backward for

BASIC Movement (Screencast 3)

]] - jump to next { in column 0 [[ - jump to previous { in column 0 ][ - jump to next closing brace in column 0 [] - jump to previous closing brace in column 0

  • hint: going forward hit right key first going backward hit left key first % - jump to matching { }, [ ], ( )

ma - mark a line 'a - jump to last mark line ``a- jump to last mark line and column''` - jump to last location

@edddieee
Copy link

edddieee commented Apr 6, 2016

Very helpful, thank you for share it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment