VIM Cheat Sheet

(Re-)Indenting a file

gg=G

Indenting HTML

To make the upper command work with HTML files add this to your .vimrc:

filetype indent on

Copy & Paste

If you want to paste stuff from your system pasteboard into a VIM instance running inside a terminal emulator do this before pasting:

:set paste

After you’re done perform:

:set nopaste

Still problems with copy & paste regarding vim/iterm/tmux? Check this out: evertpot.com