On Wed, May 09, 2007 at 12:39:45PM -0400, Dan Fabrizio wrote:
> Does anyone know why vim don't show the ^M characters in a file but vi does?

Vim understands all EOL types.  All types included in
'fileformats' are equal, whatever characters they are
physically represented with.

> :set list  
> 
> in vim shows $ at the end of the lines but no ^M characters?  

$ marks ends of lines, it does not stand for any particular
character.  If lines are ended with CRLF, CR (^M) is simply
a part of end of line, it is not included in the text.

> :set ff=unix
> :w
> 
> This removed the ^M characters but I had to use vi to verify.

You can display the current EOL style ('fileformat') any
time:

  :set ff

> Is there some setting I'm missing that needed to show the ^M characters in
> vim?

If you do not want to accept CRLF as end of line, do not
include `dos' in 'fileformats'.  Then only the LF part
becomes end of line, CR will be included in the text.  You
will see ^M displayed as you wish, however, semantically it
is not the same.

Yeti

--
http://gwyddion.net/

Reply via email to