Various VIM tricks

Delete all trailing whitespace


And delete all leading


Add text at the end of each line


Align the columns

:%!column -t

Replace a character with a new line


Increment all numbers by 1

:let g:I=1
:%g/<match this number="\d"/ s/\d\+/\=g:I/|let g:I=g:I+1

Paste a column after a different column

Use visual block (ctrl-v) to cut the second column. Then move to the end of the first line of the first column and paste the yanked column.

Save readonly file with sudo

:w !sudo tee %