From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15167 invoked from network); 9 May 2000 09:44:18 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 May 2000 09:44:18 -0000 Received: (qmail 16958 invoked by alias); 9 May 2000 09:43:37 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3058 Received: (qmail 16573 invoked from network); 9 May 2000 09:43:04 -0000 Date: Tue, 09 May 2000 10:42:31 +0100 From: Peter Stephenson Subject: Re: use vim to vi In-reply-to: "Your message of Tue, 09 May 2000 12:11:20 +0530." <20000509121120.A15491@wipro.com> To: zsh-users@sunsite.auc.dk, Raju K V Message-id: <0FUA009H4DMVBA@la-la.cambridgesiliconradio.com> Content-transfer-encoding: 7BIT > When I say zsh uses vi mode for command line editing, does it actually > use the vi editor or does it have a vi emulation inbuilt? if it calls > the vi editor for command line editing, can i make it call vim instead? No, it has its own built-in vi emulation. > also in vi mode, how can I open the command line in vi (like 'v' command in > ksh)? I had a brief go at this (I'm not a vi mode expert) and there seem to be all sorts of problems. I haven't got time to investigate, so I'm hoping this will prompt some responses. This is unfortunately not an answer to the original question. - The traditional zsh way of doing this (needed for 3.0.x) would involve pushing the current input somewhere, then running a command which uses what's there. Where is `somewhere', buffer stack or history? Both seem hard: if I use the history, it's hard to get the editor to stick something there (as we've been discovering recently), if I use the buffer stack it's hard to get a command to read it. What's an easy way of doing this? It ought to be possible to stick something in the history and just run `fc -e vi', which will pick that up, but writing bindkey -s applets (for want of a better word) for vi mode seems pretty hairy. - In 3.1.x you might hope you could run `fc -e vi' in an editing widget. This doesn't seem to work. I don't think the history is set up right. - Next attempt is to use the contents of $BUFFER (which certainly does work and is a better way of doing it in zsh), dump it to a file and run vi on that. vi is doing something very strange. I suspect (but haven't checked) it's having all sorts of problems with the terminal being set up for command line editing. I can only hope Bart's got some answers. -- Peter Stephenson Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070