[lug] Newline display in vi or more

TrentJarvi jarvi at yahoo.com
Tue Jan 18 12:32:49 MST 2000


On Tue, 18 Jan 2000, Wayde Allen wrote:

> One thing I've noticed recently is that the vi and more programs on my
> Debian box seem to ignore the ^M character added by DOS/Windows programs. 
> I find this to be troublesome since I often have to convert ascii files
> between the DOS/Windows and Unix representations.  The conversion is easy
> to do, but it helps if you can see if the conversion is needed.
> 
> Maybe there is a way to force these programs to show the non-printing
> characters ... ? 

in vim 

	vi -b dosfile.txt 

will display all the ^M's

se[t] binary

in ~/vimrc if you want that to be the default behavior

/usr/doc/vim*/doc/editing.txt also explains the 

	:se[t] fileformat=dos
	:se[t] fileformat=unix
	:se[t] fileformat=mac

options for converting files at write time.

I have little experience with other vi clones.

-- 
Trent Jarvi
TrentJarvi at yahoo.com






More information about the LUG mailing list