Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Delete everything to the left until next whitespace?
- X-seq: zsh-users 15787
- From: Richard Hartmann <richih.mailinglist@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Delete everything to the left until next whitespace?
- Date: Thu, 10 Feb 2011 21:25:54 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=t+KgkTzxy0CH0uErBEmMhO4S2xb/JPP+fNHlqfdmh2E=; b=q902Hlq4cQJiJUEs5hUQZrdE0M/m6TDAm1jHwpRiSEENrDx0FYzS9hu5T1184IDiHn k0OY3Yu6EmK+VIte7fOpj5KJ8YkzHZabLdCKKYRbeuW01dWFYDh6OMDnXeXHx8Pq1q+/ Gsc9WALV9Rrye/OitVejSlzpWvo7c4ktBNyvg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=LqQAd4j2xBg2ltKVhjRmOQ83GpirRpyKIp1FwNI5ixMPW5hVESWbcuyBmQfrqLLweB 88utHyo34NrRB/pWHDn9tgWew/3W1+29F7u3jYIjNms0tHUgZbCHGwByiXaeCvlBNgyP UVPQL4lK62p4XUHLR4vIx1Pzn+83xSLmIZkmo=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi all,
I am after something that _should_ be do-able, but somehow, the
solution eludes me.
I want to delete to the next whitespace on the left. If I am directly
to the right of one or more whitespaces, they should all be deleted.
With | being the cursor and ^ew being the keybinding for the function
I am after, examples would look like this:
% foo bar baz \!;\'a!a: |^ew
% foo bar baz \!;\'a!a:|^ew
% foo bar baz |^ew
% foo bar baz|^ew
% foo bar |^ew
% foo bar|
% foo bar |^ew baz
% foo bar|^ew baz
% foo | baz
None of this should be affected by $WORDCHARS, only by whitespace.
Thanks for any and all suggestions,
Richard
PS: Other blank/non-printable characters should probably be deleted by
this, as well.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author