On 17/10/11 15:29, Thilo Six wrote:
Thilo Six wrote the following on 17.10.2011 12:17

Hello Bram,

Additionally to already identified bogus files, where 'cpo-=C' is expected there
are ones which actually expect an environment which has 'cpo-=l' set!

IMHO those need to be fixed, too.

Actually those 'cpo-=l' bugs are not as obvious.

-- <snip>  --

After thinking a little bit more about this issue I would like to ask you Bram a
question about this.
Currently the approach seems to be that a vim script has to create a sane
environment on its own.
Maybe we should change that paradigm to:
When a vim script wants a insane environment it has to create it on its own.

That means basically that we change vim to parse each file from $VIMRUNTIME as
if it would have been preceded with 'set cpo&vim'.
This basically leads to changing cpo from 'global only' to 'script local only'.
The advantage seems to be, that vim would actually behave as script maintainers
silently expect.

Now the question Bram: What do you think about this?

If we can't have the above (for what ever reason), can we require that each and
every runtimefile has to handle cpo correctly on it's own, please?

Regards,

cpo&vim or cpo&vi or :if &cp | set cpo&vi | else | set cpo&vim | endif ?

IMO settings, however insane, set in the vimrc should be respected:

- settings which don't matter to the plugin can be left as-is
- sometimes the plugin wants to obey the setting set in the vimrc: these will also be left as-is - if a plugin requires one specific setting, then it should be saved and restored - setting specific to one filetype may be set by the ftplugin *using :setlocal* and not restored; they may be overridden by an after-plugin or a modeline.

If script maintainers expect anything else, then IMO they live on false expectations.

Your proposal makes it impossible to pass option settings from the vimrc to the plugins (I'm not talking about variable values here), or even from the ftplugin to the syntax plugin, which might be even more relevant.


Best regards,
Tony.
--
Maintainer's Motto:
        If we can't fix it, it ain't broke.

--
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

Raspunde prin e-mail lui