vim commands
##Visual
back select visual mode
shift + v or v and then b
scroll down
ctrl + e
scroll up
ctrl + y
open a new file from within vim
:vert new filename.ext
open 2 files parallel vertically
vim -O a.txt b.txt
set line number
:set nu
go to line number 123
123G
123gg
:%s/foo/bar/g
get confirmation before
:%s/foo/bar/gc
only apply to current line
:s/foo/bar/gc
replace all the spaces and tabs to end of words(note the $) with nothing
:%s/\s\+$//
undo
u
redo
ctrl + r