From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6863 invoked from network); 4 Sep 2008 14:07:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 4 Sep 2008 14:07:48 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 53992 invoked from network); 4 Sep 2008 14:07:37 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Sep 2008 14:07:37 -0000 Received: (qmail 18007 invoked by alias); 4 Sep 2008 13:40:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25606 Received: (qmail 17981 invoked from network); 4 Sep 2008 13:40:47 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 4 Sep 2008 13:40:47 -0000 Received: from mta-2.ms.rz.rwth-aachen.de (mta-2.ms.rz.RWTH-Aachen.DE [134.130.7.73]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 5317B809A19B for ; Thu, 4 Sep 2008 15:40:42 +0200 (CEST) Received: from ironport-out-1.rz.rwth-aachen.de ([134.130.3.58]) by mta-2.ms.rz.RWTH-Aachen.de (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0K6O000XP6ZJ8330@mta-2.ms.rz.RWTH-Aachen.de> for zsh-workers@sunsite.dk; Thu, 04 Sep 2008 14:06:55 +0200 (CEST) Received: from relay-1.ms.rz.rwth-aachen.de (HELO relay.rwth-aachen.de) ([134.130.7.74]) by ironport-in-1.rz.rwth-aachen.de with ESMTP; Thu, 04 Sep 2008 14:06:55 +0200 Received: from fsst.voodoo.lan ([212.117.84.168]) by relay.rwth-aachen.de (8.13.8+Sun/8.13.8/1) with ESMTP id m84C6tmB020604 for ; Thu, 04 Sep 2008 14:06:55 +0200 (CEST) Received: from hawk by fsst.voodoo.lan with local (Exim 4.69) (envelope-from ) id 1KbDb8-0003RD-3x for zsh-workers@sunsite.dk; Thu, 04 Sep 2008 14:06:02 +0200 Date: Thu, 04 Sep 2008 14:06:02 +0200 From: Frank Terbeck Subject: Re: Bug#497663: Tab completion for vim is broken In-reply-to: <20080904100301.GA19939@scru.org> To: zsh-workers@sunsite.dk Mail-followup-to: zsh-workers@sunsite.dk Message-id: <20080904120602.GB30607@fsst.voodoo.lan> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Content-disposition: inline X-IronPort-AV: E=Sophos;i="4.32,320,1217800800"; d="scan'208";a="81867240" References: <20080903130432.9601.64807.reportbug@ryoko> <20080903182826.GB7955@scru.org> <87prnk703i.fsf_-_@debian.org> <20080904100301.GA19939@scru.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: ClamAV 0.92.1/8159/Thu Sep 4 14:51:27 2008 on bifrost X-Virus-Status: Clean Clint Adams : > On Thu, Sep 04, 2008 at 12:05:05PM +0300, Arto Jantunen wrote: > > >> Typing vim and pressing tab produces the following output: > > >> > > >> _vim:31: unmatched ' > > >> > > >> Commenting out lines 31-40 in > > >> /usr/share/zsh/functions/Completion/Unix/_vim fixes the problem. Should > > >> be trivial to fix properly for someone who understands zsh's compeltion > > >> syntax (I don't). > > > > > > I can't reproduce this and I don't see what the problem might be. > > > Is this consistent for you? > > > > Hmm. Apparently it depends on "emulate csh" being used. I can't > > reproduce with a .zshrc of only > > > > autoload -U compinit > > compinit > > > > But can after adding emulate csh above those lines. > > Anyone know which option might be the culprit here? This does the trick: diff --git a/Completion/Unix/Command/_vim b/Completion/Unix/Command/_vim index 684e027..da9295b 100644 --- a/Completion/Unix/Command/_vim +++ b/Completion/Unix/Command/_vim @@ -28,15 +31,15 @@ arguments=( '-C[make vim compatible with vi]' '-N[do not force compatibility with vi]' '(--nofork -f)'{--nofork,-f}'[do not detach the GUI version from the shell]' - '-V-[verbosity level]::verbosity:((0\:"do not display any messages" - 1\:"display when viminfo file is read or written" - 2\:"display sourced files" - 5\:"display every searched tag-file" - 8\:"display files that trigger autocommands" - 9\:"display every triggered autocommand (default)" - 12\:"display every executed function" - 13\:"report every thrown, caught, finished, or discarded exception" - 14\:"display anything pending in a \:finally clause" + '-V-[verbosity level]::verbosity:((0\:"do not display any messages" \ + 1\:"display when viminfo file is read or written" \ + 2\:"display sourced files" \ + 5\:"display every searched tag-file" \ + 8\:"display files that trigger autocommands" \ + 9\:"display every triggered autocommand (default)" \ + 12\:"display every executed function" \ + 13\:"report every thrown, caught, finished, or discarded exception" \ + 14\:"display anything pending in a \:finally clause" \ 15\:"display every executed ex-command"))' '-D[debugging mode]' '-n[no swap file (memory only)]' But I don't understand, why this is not enough: diff --git a/Completion/Unix/Command/_vim b/Completion/Unix/Command/_vim index 684e027..44a317d 100644 --- a/Completion/Unix/Command/_vim +++ b/Completion/Unix/Command/_vim @@ -1,5 +1,7 @@ #compdef vim exim gvim gex gview rvim rview rgvim rgview evim eview vimdiff gvimdiff +emulate -L zsh + (( $+functions[_vim_files] )) || _vim_files () { case $PREFIX in Regards, Frank