"Best tip of all"

# Recording (BEST TIP of ALL)
qq  # record to q
your commands
q
@q to execute
@@ to Repeat
# editing a register/recording
“qp
you can now see contents of register q, edit as required
"qdd
# deletes the line back into q

Neat, expecially the part about editing the register contents.

Also :set ff=(unix|dos|mac) and then write the file to sort all your line ending woes.