On 29/05/14 11:50, Dmitry Frank wrote:
Could anyone explain why does Vim still have vi-compatibility mode? Why
would one use it?
As a consequence, we have to keep |set nocompatible| in our |.vimrc|;
there is much noise in docs like |{not in Vi}|, |{Vi: no ++opt}|, etc.
and I can't really understand why developers keep it so carefully.
I think the basic reason is that Bram finds backwards compatibility
important, and I can't fault him with that. Anyway, as Christian said,
as soon as Vim finds your vimrc it will set 'nocompatible' (except when
using the -u option), so ":set nocompatible" isn't needed unless there
might be times when you would include your vimrc by means of the -u
option; and even then you may add -N on the same command-line to achieve
the same effect.
There may still be users around who came to Vim from Vi and who never
came around to use 'nocompatible' mode, or to set their customizations
by means of a vimrc rather than an exrc. I think I've met some such
people on vim_use occasionally.
Also, Vi is part of the POSIX standard, and that standard describes in
excruciating detail how the program must behave. See ":help
posix-compliance" for the details: when $VIM_POSIX is set, Vim will even
copy some details of Vi behaviour which Bram regards as clear bugs (and
which it doesn't copy in non-POSIX 'compatible' mode).
If you want 'nocompatible' mode, as I do, make sure to put the -N switch
on the Vim command-line whenever you also include -u (be it as -u NONE
or -u filename.vim) and also when you aren't sure that there is a .vimrc
or a _vimrc in your current $HOME directory.
Best regards,
Tony.
--
~
~
~
".signature" 4 lines, 50 characters written
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.