From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 678 invoked from network); 24 Mar 1998 16:32:02 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 24 Mar 1998 16:32:02 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id LAA26659; Tue, 24 Mar 1998 11:28:00 -0500 (EST) Resent-Date: Tue, 24 Mar 1998 11:27:32 -0500 (EST) Message-Id: <19980324162607.38795@bach.memex.co.uk> Date: Tue, 24 Mar 1998 16:26:07 +0000 From: Stephen Marley To: zsh-users@math.gatech.edu Subject: Re: vi command line editing References: <19980324151425.11780@bach.memex.co.uk> <199803241546.PAA21745@taos.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88e In-Reply-To: <199803241546.PAA21745@taos.demon.co.uk>; from Andrew Main on Tue, Mar 24, 1998 at 03:46:55PM +0000 Resent-Message-ID: <"bun3r2.0.rV6.pxz5r"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1414 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Quoting Andrew Main (zefram@tao.co.uk): > Stephen Marley wrote: > >How can I get vi command line editing to start in command mode rather > >than insert mode after moving in the history with the arrow keys? I am > >using 3.0.5. > > Use the arrow keys while in command mode. I really want to avoid having to remember to type before issuing some vi commands. This causes me enormous grief after years of using zsh as I'm never sure which mode I'm in so I find myself typing 'B' or 'cw' or 'i' when I'm in already in insert mode. It does my head in! You see, my fingers are tuned to using the older vi's (eg SunOS's) where movement using the arrow keys doesn't work in insert mode. To stop spurious A's and D's (from the arrow keys escape sequences) appearing in my text I have always map!ed the arrow keys to l or k etc so that they take me into command mode and then move. Even now that I use Vim 5 I still keep these mappings because I am so used to being in command mode after moving with the arrow keys however there seems to be no way to make zsh behave like this. My current bindings for the arrow keys are: "^[[A" history-search-backward "^[[B" history-search-forward "^[[C" forward-char "^[[D" backward-char So I what I would really like, for example, is that my first typed up arrow takes me into command mode and then does history-search-backward regardless of my current mode. Is there any way to achieve this? -- stephen@memex.com