From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13776 invoked from network); 17 Jul 2000 18:13:35 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Jul 2000 18:13:35 -0000 Received: (qmail 25578 invoked by alias); 17 Jul 2000 18:13:13 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3295 Received: (qmail 25570 invoked from network); 17 Jul 2000 18:13:12 -0000 From: "Bart Schaefer" Message-Id: <1000717181300.ZM22657@candle.brasslantern.com> Date: Mon, 17 Jul 2000 18:13:00 +0000 In-Reply-To: <0FXU00GO1RFRZ5@la-la.cambridgesiliconradio.com> Comments: In reply to Peter Stephenson "Re: wanted: viins-mode and digit argument with a,i,A and such" (Jul 17, 6:33pm) References: <0FXU00GO1RFRZ5@la-la.cambridgesiliconradio.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Peter Stephenson , zsh-users@sunsite.auc.dk (Zsh users list) Subject: Re: wanted: viins-mode and digit argument with a,i,A and such MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 17, 6:33pm, Peter Stephenson wrote: } Subject: Re: wanted: viins-mode and digit argument with a,i,A and such } } > } > when i use bindkey -e, i can insert one character 10 times with } > } > ESC 10 . } > } > } > } > With vi one normally uses something like 10i. } > } > This is not possible with ZSH ( bindkey -v set ). } > } } > } If you are using 3.1, try a widget like [...] } > } > I generally agree with the new philosophy of not adding things as builtins } > that can be done as widgets, but this is so unbelievably trivial and so } > completely general that I have no idea why we shouldn't do it: } } This isn't quite how vi handles it, however. True, but it is how your read-and-insert-char widget handles it. } It would wait till you hit escape, then insert everything you typed } that many times. That would need more work. Yes; I have a vague idea that it could be done by stashing away a copy of the zmod structure, and then upon ESC you restore it, decrement the zmult field, and invoke virepeatchange() ... the tricky bit could be interaction with the `lastmod' copy of zmod that startvichange() uses. Or maybe lastmod already contains almost everything we need ... } Plus in zsh there are other ways of exiting insert mode than } returning to command mode --- what should happen on `return'? The same thing that happens now when you type e.g. `8 d RET' -- it just accepts the buffer as it stands, aborting the repeat. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net