From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26553 invoked by alias); 4 Oct 2013 23:26:04 -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: 18020 Received: (qmail 833 invoked from network); 4 Oct 2013 23:25:58 -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,HTML_MESSAGE,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=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=nI9N6qY09WW6v67/K2GCQJ7eT7RipLRGPl3WgmRWg+I=; b=GWAJnQt76TpRB/NXjya6s0IrGJncGXupOm6fsWmWIs67XMDTOnvq9D5PuiNVOJ4Yoz x0WDJx1tY97uYnW7PIX19maXiTIn3cDNCE+xtS9V6RH/wzhQVo6GC0RRE9CPV6SZTXCA gOmG3oYpvwerDLUTnQxR32J1l2g2zjwALiyZ4l8M8m01u6Fu4oa9OU1aGoGTrQFS4M6B 07Bb6pYYTHypYatqmsdoJss3IZj55rTHSBvpYW8EQirmDNtzGhcposZHkYmQPGZS+dAh CzvUAprypi1TploDpG9+gMFdctlwsQNu0HkIxYuefBDSi+S8WF4w+0j0k0zEF27NDf9p PzbA== X-Received: by 10.181.11.163 with SMTP id ej3mr9403261wid.47.1380928808790; Fri, 04 Oct 2013 16:20:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20131004220328.GE19282@hazmatt> References: <20131004220328.GE19282@hazmatt> From: "Jack O'Connor" Date: Fri, 4 Oct 2013 16:19:38 -0700 Message-ID: Subject: Re: Emulating vim's Ctrl-W behavior To: Matt Garriott Cc: zsh-users Content-Type: multipart/alternative; boundary=f46d043be1e01baf8804e7f28bf2 --f46d043be1e01baf8804e7f28bf2 Content-Type: text/plain; charset=ISO-8859-1 Awesome, and thanks for the quick response! I was using a mix of bindings from the emacs and vi modes, and I'd ended up with the emacs version of Ctrl-W without realizing they were different. I ended up using "bindkey '^W' vi-backward-kill-word". -- Jack On Fri, Oct 4, 2013 at 3:03 PM, Matt Garriott wrote: > 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 > --f46d043be1e01baf8804e7f28bf2--