From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29035 invoked by alias); 4 Oct 2013 22:03:42 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18019 Received: (qmail 470 invoked from network); 4 Oct 2013 22:03:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=f5ji6jluaQhUIeB51ZBxfaM+hHXDcgoeSkwI5+aRJIg=; b=VbU/zviHw5eSiC4jQsoNg75AzjTlh3WnO/B935zJKryAJ6DHrpJegThIyS6+C93XfV 3LZ0u0Ls6Xcp9CUFzeKDe86yoHkga5aBUq0njw+Z3hgvAXAxZVzDt5mr/9ym6QtsGy1s 75zNwKuhBzbj6dWMSRgMsCQDeYEyqD+yGzowVW+vzYCRuZaz9ASbkPop3v3VWiy2b6SK QMLXQAXfilhoZDjf9GMhfl4haV9mv/y5Vb5LcZS2OuZj3hHS23yEBFnMEJ2iKtXD75fp zXbT+OLWKt5wiMaddOOp2DyK6nUg0HucGmI+lWjtXJLRVnIYavylCQGoVkmga2KLsLyT ulBg== X-Received: by 10.43.60.139 with SMTP id ws11mr10248978icb.12.1380924212491; Fri, 04 Oct 2013 15:03:32 -0700 (PDT) Date: Fri, 4 Oct 2013 16:03:28 -0600 From: Matt Garriott To: Jack O'Connor Cc: zsh-users@zsh.org Subject: Re: Emulating vim's Ctrl-W behavior Message-ID: <20131004220328.GE19282@hazmatt> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Hi Jack, If you use zsh's vi edit mode (instead of emacs mode) you will get this behavior by default. You can set your shell to use vi mode with this command. bindkey -v This will set your shell's line editing mode to vi-style. You can get more info with: man zshzle -Matt On Fri, Oct 04, 2013 at 02:20:57PM -0700, Jack O'Connor wrote: > Zsh likes to nuke my pipes when I delete backwards. For example, if I have > the line... > > echo a | grep > > ...and I press Ctrl-W twice, then what I'd like to have (and what vim and > bash give me) is... > > echo a > > But zsh doesn't seem to count the pipe as a word, and the second Ctrl-W > plows through it and deletes the "a". Is there any way to configure zsh to > get vim's behavior? And related, is there a way to delete backwards to the > next slash in a path, as Ctrl-W does in vim, rather than deleting the whole > path? Thanks very much. > > -- Jack O'Connor