Key reference

0
1Novice0 XP

Key reference

0 of 50 learned

01First steps

Intro to modes
  • iInsert before the cursor
  • EscReturn to Normal mode
Moving with h j k l
  • hLeft
  • jDown
  • kUp
  • lRight
More ways to insert
  • aAppend after cursor
  • AAppend at end of line
  • IInsert at line start
  • oOpen line below
  • OOpen line above

02Getting around

Word motions
  • wNext word start
  • bPrevious word start
  • eWord end
  • WBESame, whitespace-separated
Line jumps & counts
  • 0Line start
  • ^First non-blank
  • $Line end
  • ggFirst line
  • GLast line (or line N with a count)
Find in line
  • f{c}Jump onto next c
  • t{c}Jump to just before c
  • FTSame, backwards
  • ;,Repeat / reverse
Search
  • /textSearch forward
  • nNext match
  • NPrevious match

03Making changes

Deleting
  • xDelete character
  • ddDelete line
  • DDelete to end of line
Undo, redo & repeat
  • uUndo
  • Ctrl-rRedo
  • .Repeat last change
Operators + motions
  • d{motion}Delete
  • c{motion}Change (delete + insert)
  • ccChange whole line
Yank & put
  • yyYank line
  • y{motion}Yank motion
  • pPut after
  • PPut before
Quick edits
  • r{c}Replace character
  • ~Toggle case
  • JJoin lines

04Power moves

Text objects
  • iwawInner / around word
  • i"a"Inside / around quotes
  • i(a(Inside / around parens
  • i{a{Inside / around braces
Visual mode
  • vVisual (characters)
  • VVisual (lines)
  • oJump to other end