Return To Home Return To Notes >

Basic Vim Notes


Two modes, insert and normal


  • Vim has two basic modes. One is insert and the other is normal

  • In insert mode you can type like in a document, in normal you can navigate and manipulate text

  • To change between modes, use ESC for normal mode and I for insert mode


  • Basic Movement: h, j, k, and l


  • H Will make the bar move back

  • J Will make the bar jump forward 1 line

  • K Will make the bar jump backward one line

  • L Will make the bar move forward


  • Word movement: w, e, b


  • W Moves to the start of the next word

  • B Moves to the beginning of the word

  • E Moves to the end of the word


  • Number powered movement


  • 5{} is the same as pressing {}5 times

  • e.g {1, 2, 3, 4, 5, 6, 7, 8, 9, } {H, J, K, L,}


  • Insert text repeatedly


  • CTRL+o :norm{Number of characters to print}i{character you want to print}

  • e.g norm:15i-


  • Find a character, f and F


  • f+{character you want to find}

  • 3f+{character you want to find}

  • (This will let you find the third occurrence of{character you want to find})


  • Go to matching (), {}, []


  • Shift+5