nocp/cp

Pierre Habouzit pierre.habouzit at m4x.org
Sat Jun 3 10:10:33 UTC 2006


Le Sam 3 Juin 2006 10:05, Stefano Zacchiroli a écrit :
> On Fri, Jun 02, 2006 at 10:56:07PM +0200, Pierre Habouzit wrote:
> > I think we should make the fact that 'compatible' mode is enforced
> > in .virc a debconf question that is:
> >  * of the lowest priority for vim-tiny, and defaults to compatible
> >  * of normal priority and defaults to *nocompatible* for other
> > variants. that allow vim-tiny to have the expected behaviour in
> > d-i, and most user to remain unannoyed. It seems to be a really
> > good compromise to me.
>
> I like this approach. An open issue is how to implement it. More
> precisely, what will be the effect of the debconf choice? At the
> moment the 'vi'/'vim' split is hard coded in a patch which is
> compiled in.
>
> Are you thinking about making /etc/vim/virc source either
> /usr/share/vim/vimcurrent/debian-vi.vim or to debian-vim.vim or
> something similar?

well, I was describing a "functionnal" way to fix the problem, that 
looked satisfying. as of how to do this, we cannot touch /etc/* files 
from debconf, it's "too hard".

but we could generate debian.vim from a template, with some sed magic 
e.g.

is there any vim variable that holds the command that launched vim ? 
(I'm rather confident there is one). if yes, then what we need is 
mostly:

if $command == vi AND user_wanted_compatible
  set cp
else
  " rest of the debian.vim
fi

of course user_wanted_compatible is a ##FORCE_COMPATIBLE## thing, that 
is sed-ed to true/false depending upon what the user wanted, from the 
debian.vim.template in the same directory.

(it's only an idea of implementation btw).
-- 
·O·  Pierre Habouzit
··O                                                madcoder at debian.org
OOO                                                http://www.madism.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20060603/0e51dc63/attachment.pgp


More information about the pkg-vim-maintainers mailing list