Useful Vim stuff - nus-cs2030/2021-s2 GitHub Wiki

Command Mode

  • gg=G reindent the entire file
  • u undo the last the command and U to undo the whole line
  • CTRL-R to redo
  • :wq to save and exit
  • :q! to trash all changes