How do I hide the eol doc chars ^M in VIM

Viewed 20943

In gvim on windows if I have text with CRLF eol then the text will display ^M at the end of each line.

How do I 'hide' that special char from display?

The :set nolist command """ does not dismiss it.

UPDATE

I did :set fileformats=unix,dos as a list. It didn't work at first, but I closed the file and reopened it again and it worked.

By default I had set fileformats to only unix value.

Thanks for answers.

7 Answers

I'd like to point out that if you are using full blown VIM (at least on my ubuntu 9.10 box) it "does what you want" and auto-hides it, but the stock vi (and vim-tiny) do NOT auto-hide the ^M. If you do a minimal install (or server install) you get vi and vim-tiny only. The fix I found was to install proper vim (apt-get install vim) on my ubuntu box. Hope that helps someone that comes along this topic for the same reason I did :-D

Related