On Sun, 30 Apr 2006, Yakov Lerner wrote:
On 4/30/06, Gerald Lai <[EMAIL PROTECTED]> wrote:
On Sun, 30 Apr 2006, Yakov Lerner wrote:
> On 4/30/06, Gerald Lai <[EMAIL PROTECTED]> wrote:
>> On Sun, 30 Apr 2006, Yakov Lerner wrote:
>>
>> > On 4/30/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote:
>> >> > :help 'compatible'
>> >> >
[snip]
>> 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.
>
> It's only a switch if 'nocp' was off and becomes on. If option
> X has value Y and I do 'set X=Y' I expect it to be noop, except maybe
> screen refresh. When option had different value, and I change it's
> value, then I agree it's a switch.
That would be nice, but how about options like 'filetype', 'fileformat'
or 'background' that need to be "refreshed"? Or options like
'indentkeys' or 'listchars' that could be an out-of-order
comma-separated list composed of anything?
There's too much overhead of checking whether X=Y just to do a noop.
Since when it's too much overhead to check the
value of binary option for equaliy or not equality ?
Sorry, I meant to say that there's overhead for checking if option X ==
Y for options that are non-binary, like 'indentkeys' or 'listchars'.
For binary options, your suggestion is plausible, though I do
agree with Gary said. Some options have to be refreshed, and it will be
inconsistent to have setting binary options do a noop if the option is
set to what it already is, while other options maintain the same :set
behavior.
An exception could be made for 'compatible', but that is an exception
Bram would have to make.
--
Gerald