Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Delete everything to the left until next whitespace?



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