[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Weirdness with vi



On Wed, Dec 01, 1999 at 01:07:13AM +0000, Michael Koehne wrote:
> 
>   At last a warning !not! to use vim. This vi has the ugly bug^h^h^hfeature
>   to know that MS-DOS files end with \r\n. So vim will suppress the leading^M
>   normaly shown by real vi versions. I've seen it many times that such a^M
>   caused a script to break, and a programmer unable to find the bug for hours.

Yes, this is annoying when you're not expecting it, but you can control
how your file is saved with ":set fileformat=unix" (vim will convert
for you).

Alternately, you can fire up vim in binary mode ("vi -b filename.txt")
which will show you the ^M characters.

- Chris

-- 
-------------------------------------------
"Chase the dream, not the competition."
     - motto of the Nemesis Air Racing Team


Reply to: