Vim Cheat Sheet

Contents
Here I will post some usefull vim shortcuts/commands that I often use(and forget) for those of you that care.
Comment out multiple lines
- Go to the first line you want to comment out
- Press
CTRL + V
to enter visual block mode - Mark the lines you want to comment out with
Up
orDown
- Hit
SHIFT + i
to enter insert mode - Type in the character you want to insert the comment with. eg.
#
- Press
ESC
and vim will fill out every line with the character of your choice.
Remove whitespace
:%s/\s\+$//e