Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.0
X-Injected-Via-Gmane: http://gmane.org/
To: zsh-workers@zsh.org
From: Larry Hynes <larry@larryhynes.com>
Subject: vi-history-search(forward|backward) vicmd mappings
Date: Sat, 23 Jan 2016 23:30:07 +0000 (UTC)
Lines: 35
Message-ID: <n812dv$ka2$1@ger.gmane.org>
Reply-To: Larry Hynes <larry@larryhynes.com>
X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: ptr-3-162.fbo.ip.airwire.ie
User-Agent: slrn/1.0.2 (Darwin)
X-Seq: zsh-workers 37748

Hullo

The default vicmd mappings for

    vi-history-search-forward (?)

and

    vi-history-search-backward (/)

have confused me.

vi(m)-like behaviour is always to have '/' search forward and
'?' search backward.

Say my, notional, .zhistory file contains:

    foo
    bar
    baz
    qux

The search appears to begin at the last line 'qux' - as if the
history file is read in as 'vi +G .zhistory' - so to search
backwards for 'foo', I would - in vi - enter '<ESC>?' and, once
there, enter '/' to search forwards for 'baz' but it seems to be
the opposite in zsh.

In fact, if one enters '<ESC>?' on a zsh command line with
'bindkey -e' in effect the mini-buffer prompt becomes '/' to
signify a forward search, and '<ESC>/' produces a '?' to signify
a backward search, so I propose that the default mappings are,
perhaps, backwards?

Or am I missing something?

