From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25126 invoked by alias); 10 Feb 2011 20:26:21 -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: 15787 Received: (qmail 2052 invoked from network); 10 Feb 2011 20:26:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) 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, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.171 as permitted sender) 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= MIME-Version: 1.0 From: Richard Hartmann Date: Thu, 10 Feb 2011 21:25:54 +0100 Message-ID: Subject: Delete everything to the left until next whitespace? To: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 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.