From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25654 invoked by alias); 23 Jan 2016 23:59:30 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37753 Received: (qmail 678 invoked from network); 23 Jan 2016 23:59:28 -0000 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,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=bP/892xWIvL/i8ZxvVyN1N/aLrKhmNryCDAUcAIid0k=; b=0wq+I9cjr/cmOYRi/amS4St6LETvJYH9Lqk0zOBajdlWqLcMlU5ipBd88ISC2oYJJn I2+ju6OOIR4ftR3wJT1tPpbzRpD6F/Ef3nM2xJzCCLcUaNCDpfUc85ZO9Tns/RhBezNG pUyknY73VXzHShMZy8ewzmFQ/EUL9uvy0OtCwzNvCDCly6+mnBdP9jeS+ZxtP82q3UiL O73P0sSsT9mP3VtI2fZp7ToUvR516RhjYC9dqb9z65YL8z8KzOIilJCjsdk6uFK9Uao6 wj2/1FmAqDEciPDKelTf3tesUKou3KK8VNv3HyGpGOk9/H/vKHAPrlClp6IIxm7P56MS ez/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=bP/892xWIvL/i8ZxvVyN1N/aLrKhmNryCDAUcAIid0k=; b=BIevx1dUIewErNIk6JHUZAOUTWjHSD/SAN85aTU9qNoehhgoj6PesWhok/Dg8xyldw 6ftUohlTKb1ekQaksQzY1YS0RltF21LUHG1VY3ddreJ8E2KPQvHwXW4RVjRNboakAOVj WF2JKB2pj3uTAujzl9t93UJDaSmjajAvSsmRFot09QCtDfrecb1HrkQjmLkEZlBcv6b2 RfbJxuZrgtEGz3dgz9ueSFIB0QcmWU4+peitkw3xwtySdbaPpBPVE5daBtIlta2V6KBD YOAXkpwAaiNJ+HH2Na+okA+meIepbKiXIZUmA0NIKsoMW8IhU086yNXjxbl5S2NPpxBO mJZw== X-Gm-Message-State: AG10YOS9a0u83bU1NQIfadPHg13rpMqWE29Vf/j99EzvLI/OpKGAFXBrw4BXNU5mWthC0A== X-Received: by 10.67.4.100 with SMTP id cd4mr15283811pad.59.1453593565745; Sat, 23 Jan 2016 15:59:25 -0800 (PST) From: Bart Schaefer Message-Id: <160123160002.ZM15365@torch.brasslantern.com> Date: Sat, 23 Jan 2016 16:00:02 -0800 In-Reply-To: Comments: In reply to Larry Hynes "vi-history-search(forward|backward) vicmd mappings" (Jan 23, 11:30pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: vi-history-search(forward|backward) vicmd mappings MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 23, 11:30pm, Larry Hynes wrote: } } In fact, if one enters '?' on a zsh command line with } 'bindkey -e' in effect the mini-buffer prompt becomes '/' to } signify a forward search, and '/' produces a '?' to signify } a backward search, so I propose that the default mappings are, } perhaps, backwards? This is intentional. I've always thought it was a bit weird, but the reasoning (from 20+ years ago) goes like this: The vi-*search-* widgets don't include the current buffer, and even if they did the most common place to invoke a search is at the end of the command line, and the history only extends backwards in time; so for all those reasons it almost never makes sense to search in the "forward" direction. But the "muscle memory" of most vi users is accustomed to invoking search by whacking the slash key, not the question mark. One way to address this would be for the search to wrap around, but it is far more common to want to find the most recent command than the oldest one. Therefore slash is bound to the most useful search direction, not to the widget that corresponds by name to the meaning in vi(m). But sometimes you really do need to search forward, so the "opposite" keystroke from vi(m) is bound to the opposite search direction, to avoid having no default foward search binding at all.