On 2008-09-27 at 14:31 -0500, Peter da Silva wrote:
> On 2008-09-27, at 13:41, Aristotle Pagaltzis wrote:
> > It does that by default. What's more, it does that only
> > when all of the line endings are consistent.
> 
> It shouldn't do it at all. If you are on UNIX, it should always show  
> the ^Ms, regardless of whether it's consistent or not.
> 
> VIM is full of hateful crap like this, and it's hateful that apple  
> replaced nvi with vim in OS X.

Let's target the hate more accurately, please.

vim, by default, shows the ^M as present when there in a file.

However, Apple choose to ship with /usr/share/vim/vimrc present, which
deliberately moves vim away from its defaults of vi compatibility.

If a vi-clone goes out of its way to be as close as possibly by default
and then an OS vendor ships with config settings to change that, which
should you be blaming for the differences?  The editor, just because it
chooses to make different functionality available?  After all, if it
never changes then it's stagnant and shockingly enough, there have been
improvements in usability over the years -- the past is not always
better.

Move /usr/share/vim/vimrc aside on your MacOS box and get your ^M back.

Use "vim --version" to see:
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"

which is how I found the system file and confirmed this.

Myself, I hadn't noticed this because my .vimrc, which also sets
nocompatible, makes various other changes I choose to have in addition
to not behaving the same as historical vi, amongst them:
  set fileformats=unix
which is the magical two-letter incantation to tell vim to treat all
files as Unix-like so that anything before the \n is shown.

Normally I like hates-software, but this particular uninformed whining
by people who can't be bothered to check and blaming whatever looks like
it might, at first glance, be at fault, reminds me of nothing less than
a user forum of people whining about their sysadmin and how Unix is
different from Windows and therefore buggy.

-Phil

Reply via email to