From: Matt Garriott <matt.garriott@gmail.com>
To: Jack O'Connor <oconnor663@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: Emulating vim's Ctrl-W behavior
Date: Fri, 4 Oct 2013 16:03:28 -0600 [thread overview]
Message-ID: <20131004220328.GE19282@hazmatt> (raw)
In-Reply-To: <CA+6di1m1XWgdrCaKWuQzsHcrzONdrSLkTFnGcxZYzv2uriX6WQ@mail.gmail.com>
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
next prev parent reply other threads:[~2013-10-04 22:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-04 21:20 Jack O'Connor
2013-10-04 22:03 ` Matt Garriott [this message]
2013-10-04 23:19 ` Jack O'Connor
2013-10-05 4:30 ` Bart Schaefer
2013-10-05 12:00 ` Valodim Skywalker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131004220328.GE19282@hazmatt \
--to=matt.garriott@gmail.com \
--cc=oconnor663@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).