Skip to content

Instantly share code, notes, and snippets.

Last active Nov 3, 2018
What would you like to do?
VIM Tutor

Vim Tutor

What I learned by vimtutor.


Skip this. Use vimtutor instead.

General usage

c [number] motion


  • 0 Begin of line
  • $ End of line


  • u undo
  • U undo line
  • CTRL+r redo


  • Press G to move you to the bottom of the file.
  • Jump to line 123G or :123
  • Type gg to move you to the start of the file.
  • To go back to where you came from press CTRL-O
  • CTRL-I goes forward.
  • % jumps between matching parentheses


  • To search for a phrase in the backward direction, use ? instead of /.


  • :%s/old/new/gc replace word in file with confirmation


  • :w FILENAME writes the current file to disk
  • v motion :w FILENAME saves the Visually selected
  • :r FILENAME reads file and inserts it
  • :r !dir reads the output of the dir command


  • i insert
  • a insert after cursor
  • I insert begin of line
  • A insert end of line


  • r one char
  • R replace multiple chars
  • Ctrl+j remove line break


Plug 'easymotion/vim-easymotion'

Jump in file aka Autojump ,,w

Plug 'terryma/vim-multiple-cursors'

Select next occurence of word CTRL+n

Plug 'prettier/vim-prettier', { 'do': 'npm install' }

Format code with ,p or on save

Plug 'tpope/vim-surround'

Surround with parens eg. ysiW" or ds"

Other ressources

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