convert ^M line break to a normal line break in vim

Sometimes a file created in Windows will show ^M as a line break if you open it up in unix like system, and you will see everything is mashed into one line separated by ^M.
To convert the ^M into a normal line break so not everything is mashed into one line is very easy. Open up the file with vim, then press these keys:
Esc, :, %, s, /, Ctrl-v,Ctrl-m,/,Ctrl+v,Ctrl+m,/,g,enter,Esc,:,x,enter


^V^M means type Ctrl+v, then Ctrl+m.

Search within Codexpedia

Custom Search

Search the entire web

Custom Search