#To show non printable characters (whitespace and the like) :set list #Strip all the ^M carriage returns you get with windows files #Make sure that you make the ^M by typing "CTRL-V CTRL-M" # we are entering a special character! :%s/^M$//g