Few of tips for beginners like me:
To start coding in vim
press <i> key and you are in insert mode to start writing
To exit text insert mode press Esc key and press colon key for :
to enable line number
if line number don't show up for already open text or any file. type
you will enter ex mode then type
you will return in visual mode and you will see line number of previously typed set number command, to hide line number type
Strip out the DOS line endings '^M' is to use the ff option:
Now your file is back to the good-old-Unix-way.
If you want to add the DOS line-endings (to keep a printer happy, or transfer files with Windows friends who don't have nice tools) you can go the opposite direction easily.
search and replace a word
search and replace a word every occurrence in file.