zsh-users
 help / color / mirror / code / Atom feed
From: Stephen Marley <stephen@memex.com>
To: zsh-users@math.gatech.edu
Subject: Re: vi command line editing
Date: Tue, 24 Mar 1998 16:26:07 +0000	[thread overview]
Message-ID: <19980324162607.38795@bach.memex.co.uk> (raw)
In-Reply-To: <199803241546.PAA21745@taos.demon.co.uk>; from Andrew Main on Tue, Mar 24, 1998 at 03:46:55PM +0000

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 <ESC> 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 <esc>l or <esc>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


  reply	other threads:[~1998-03-24 16:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-24 15:14 Stephen Marley
1998-03-24 15:46 ` Andrew Main
1998-03-24 16:26   ` Stephen Marley [this message]
1998-03-24 17:06     ` Andrew Main
1998-03-24 18:04       ` Stephen Marley
1998-03-24 18:35         ` Andrew Main
1998-03-24 18:57           ` Thomas Koehler
1998-03-24 19:38             ` Andrew Main
1998-03-24 20:30               ` Thomas Koehler
1998-03-24 22:05                 ` HPUX (was Re: vi command line editing) Shawn Leas
1998-03-24 23:22                   ` Shawn Leas
1998-03-25 10:22                   ` Andrew Main
1998-03-25 16:01                     ` Dan Nelson
1998-03-25 16:45                     ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
1997-01-28  0:18 VI command line editing Vidiot
1997-01-28 15:10 ` Zefram
1997-01-28 16:27   ` Bart Schaefer
1997-01-28 16:31     ` Zefram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19980324162607.38795@bach.memex.co.uk \
    --to=stephen@memex.com \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).