On Sun, 30 Apr 2006, Yakov Lerner wrote:
On 4/30/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote:
> :help 'compatible'
>
> where (among other things) you can find the warning
>
> This is a special kind of option, because when it's set or reset,
> other options are also changed as a side effect. CAREFUL: Setting
or
> resetting this option can have a lot of unexpected effects:
Mappings
> are interpreted in another way, undo behaves differently, etc. If
you
> set this option in your vimrc file, you should probably put it at
the
> very start.
There is a remark about this right at ":help 'history'".
Maybe behaviour of 'set nocp' can be differentiated depending on
whether &cp was already off , or &cp was on. It's one thing if
you do 'set nocp' and &cp was on, and another thing when
you do 'set nocp' and &cp was already off. Maybe 'set nocp'
doesn't need to reset options to default values when it was
already 'nocp'.
But in Meino's case, it may have been that he was still in Vi compatible
mode when he set history.
The 'compatible' option is one that clobbers settings, but for a good
reason. It determines whether Vim should work like Vi, or take on the
modern Vim capabilities. It's a big switch.
There's a brief mention of 'set compatible' in ":help system-vimrc", but
it doesn't stress that it should be placed at the very top. Perhaps it
should. The only mention of this is at ":help 'compatible'". I'm not
sure if beginners reading starting.txt will notice to check out the
option help.
--
Gerald