From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10042 invoked from network); 21 Apr 2005 07:26:37 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 21 Apr 2005 07:26:37 -0000 Received: (qmail 55541 invoked from network); 21 Apr 2005 07:26:31 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Apr 2005 07:26:31 -0000 Received: (qmail 11707 invoked by alias); 21 Apr 2005 07:26:22 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8725 Received: (qmail 11692 invoked from network); 21 Apr 2005 07:26:21 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 21 Apr 2005 07:26:21 -0000 Received: (qmail 54332 invoked from network); 21 Apr 2005 07:26:21 -0000 Received: from vms048pub.verizon.net (206.46.252.48) by a.mx.sunsite.dk with SMTP; 21 Apr 2005 07:26:16 -0000 Received: from candle.brasslantern.com ([4.11.1.68]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IFA00JZ6CNQ87U2@vms048.mailsrvcs.net> for zsh-users@sunsite.dk; Thu, 21 Apr 2005 02:26:15 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j3L7QENX001653 for ; Thu, 21 Apr 2005 00:26:14 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j3L7QEUn001652 for zsh-users@sunsite.dk; Thu, 21 Apr 2005 00:26:14 -0700 Date: Thu, 21 Apr 2005 07:26:13 +0000 From: Bart Schaefer Subject: Re: Vi ZLE bindings: status in prompt? In-reply-to: =?iso-8859-1?Q?=3C20050421052401=2EGA20169=40picard=2Efranken?= =?iso-8859-1?Q?=2Ede=3E?= =?iso-8859-1?Q?Comments=3A_In_reply_to__Thomas_K=F6hler_=3Cjean-luc=40pic?= =?iso-8859-1?Q?ard=2Efranken=2Ede=3E?= =?iso-8859-1?Q?________=22Re=3A_Vi_ZLE_bindings=3A_status_in_prompt=3F=22?= =?iso-8859-1?Q?_=28Apr_21=2C__7=3A24am=29?= To: zsh-users@sunsite.dk Message-id: <1050421072614.ZM1649@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable References: <20050420214722.GA9995@pohl.lj.net> <20050421052401.GA20169@picard.franken.de> X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Apr 21, 7:24am, Thomas K=F6hler wrote: } } > some way to add the Vi mode to the prompt. } = } I have such a thing implemented. You can have a look at my .zshrc } to see how it works: } = } http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/zsh/zsh= rc That relies on being able to reposition the cursor to where the prompt was last drawn, and write something new over it, without the real prompt being reprinted. Which is clever, if not entirely reliable. In recent CVS snapshots there's a built-in widget called "reset-prompt" that can be used to cause zle to redraw the true prompt. That plus the readonly KEYMAP parameter can probably be caused to do the right thing, though you've still got to redefine all the vi widgets to call reset-prompt on every mode change.