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.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS
	autolearn=ham autolearn_force=no version=3.4.1
X-Injected-Via-Gmane: http://gmane.org/
To: zsh-workers@zsh.org
From: Larry Hynes <larry@larryhynes.com>
Subject: PATCH: make vi-history-search(forward|backward) more vi-like
Date: Mon, 21 Mar 2016 23:30:10 +0000 (UTC)
Lines: 49
Message-ID: <ncq062$59q$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-184.fbo.ip.airwire.ie
User-Agent: slrn/1.0.2 (Darwin)
X-Seq: zsh-workers 38202

This is a (possibly Quixotic) follow-up to the thread at [1] and
swaps the current zsh bindings for vi-history-search-forward and
vi-history-search-backward, aligning them with vi* behaviour
i.e. bind '/' to search forward and '?' to search backward.

--- Src/Zle/zle_bindings.c	2015-08-12 20:07:17.000000000 +0100
+++ Src/Zle/zle_bindings.c.cor	2016-03-21 23:06:29.000000000 +0000
@@ -337,7 +337,7 @@
     /* , */ z_virevrepeatfind,
     /* - */ z_viuplineorhistory,
     /* . */ z_virepeatchange,
-    /* / */ z_vihistorysearchbackward,
+    /* ? */ z_vihistorysearchbackward,
     /* 0 */ z_vidigitorbeginningofline,
     /* 1 */ z_digitargument,
     /* 2 */ z_digitargument,
@@ -353,7 +353,7 @@
     /* < */ z_viunindent,
     /* = */ z_listchoices,
     /* > */ z_viindent,
-    /* ? */ z_vihistorysearchforward,
+    /* / */ z_vihistorysearchforward,
     /* @ */ z_undefinedkey,
     /* A */ z_viaddeol,
     /* B */ z_vibackwardblankword,

--- Doc/Zsh/zle.yo	2015-11-15 18:54:50.000000000 +0000
+++ Doc/Zsh/zle.yo.cor	2016-03-21 23:09:55.000000000 +0000
@@ -1502,7 +1502,7 @@
 first word in the buffer.
 )
 tindex(vi-history-search-backward)
-item(tt(vi-history-search-backward) (unbound) (tt(/)) (unbound))(
+item(tt(vi-history-search-backward) (unbound) (tt(?)) (unbound))(
 Search backward in the history for a specified string.
 The string may begin with `tt(^)' to anchor the search to the
 beginning of the line.
@@ -1542,7 +1542,7 @@
 first word in the buffer.
 )
 tindex(vi-history-search-forward)
-item(tt(vi-history-search-forward) (unbound) (tt(?)) (unbound))(
+item(tt(vi-history-search-forward) (unbound) (tt(/)) (unbound))(
 Search forward in the history for a specified string.
 The string may begin with `tt(^)' to anchor the search to the
 beginning of the line. The functions available in the mini-buffer are the same

[1]: http://www.zsh.org/mla/workers/2016/msg00283.html


