VI commands!


  • h,l,j,k (or arrow-keys) : Move left, right, down, up respectively
  • 0 : To beginning of line
  • $ : To end of line
  • w (word) : Step one word to the right
  • b (back) : Step one word to the left
  • G : Move to the last line
  • nG : Move to line n
  • /string : Searches for string forwards
  • ?string : Searches for string beckwards
  • % : find corresponding parantheses

  • u : Undo last change
  • U : Undo all changes on line
  • :q! : Exit VI without saving

  • a (append) : Append text after cursor
  • A : Append text at the end of line
  • i (insert) : Insert text on cursor position
  • o (open) : New line beneath current line
  • O : New line above current line
  • p (put) : Insert buffer after cursor
  • P : Insert buffer on cursor
  • :r filename : Insert file after cursor

  • x : Erase character on cursor
  • dd : Erase line
  • D : Erase to end of line
  • y : copy line to buffer

  • :w filename : Saves the file with name filename
  • :w : Saves the file
  • :w >> filename : Append file to filename
  • ZZ : Save and exit

  • qrisse@poedecoder.com