Bug#438560: Should -N/-C override 'compatible' settings in vimrc files?
James Vega
jamessan at debian.org
Fri Feb 8 00:59:23 UTC 2008
On Thu, Feb 07, 2008 at 10:20:27PM +0100, Bram Moolenaar wrote:
>
> James Vega wrote:
>
> > On Wed, Feb 06, 2008 at 09:43:33PM +0100, Bram Moolenaar wrote:
> > > The main reason to do it this way is that when a startup script contains
> > > "set nocp" the following lines often depend on this. If one would start
> > > "vim -C" and the -C would cause the "set nocp" line to be ignored, the
> > > rest of the script would be misinterpreted. Especially for ":map"
> > > commands with things like "<C-A>". With 'nocompatible' this means
> > > CTRL-A, with 'compatible' this is 5 separate characters.
> >
> > The initial bug was specifically that "vim -C" with "set nocp" in a
> > startup script resulted in a Vim session that didn't have 'compatible'
> > set as per the man page. I notice that the help for -C indicates the
> > ":set nocompatible" command will override -C so maybe it would be
> > sufficient to add this to the man page as well. A similar note should
> > be added to the help/man page for -N.
> >
> > This would be a simpler solution, although I still think that if the
> > user is specifically requesting (no)compatible mode at the command line,
> > they should be able to deal with side-effects it may have on startup
> > scripts.
>
> Well, a possible solution would be to do "set compatible" after all the
> startup stuff is done. I suppose that would work as expected.
Attached patch to do so.
--
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: commandline-compatible.diff
Type: text/x-diff
Size: 1419 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20080207/31854d8f/attachment.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20080207/31854d8f/attachment.pgp
More information about the pkg-vim-maintainers
mailing list