David Frey wrote:
I am running gvim 6.3 under windows 2000. When I open a certain file, I
see ^M at the end of the lines.
When I do :set fileformat it shows
fileformat=unix
If I do :set fileformat=dos, the ^M characters are still visible.
What I want is to be able to edit the file without having to see all the
^M characters. I don't want to create a noisy diff by modifying every
line in the file, so simply removing the ^M characters is not an option.
What can I do?
I have this set in my vimrc.vim file:
" get rid of the pesky ^M
au BufEnter * :%s/[ \t\r]\+$//
I have not seen one since. :)
Robert