Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Wishlist for zsh: 3 tcsh features
- X-seq: zsh-users 4357
- From: max@xxxxxxxxxxxx
- To: "James F. Hranicky" <jfh@xxxxxxxxxxxx>
- Subject: Re: Wishlist for zsh: 3 tcsh features
- Date: Tue, 9 Oct 2001 13:22:40 +0300
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20011008161313.EC4ACD804@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20011008161313.EC4ACD804@xxxxxxxxxxxxxxxxx>
James F. Hranicky wrote:
>
> I've been a happy user of zsh for a few years now, but there's 3
> features
> from tcsh that I'd love to either know how to enable or know how to add
> to zsh:
>
> 1) <Meta-Del>: In tcsh, when deleting elements in a path,
> <Meta-Del> generally deletes everything up to the next
> "/" character, e.g.
I'm using the following clumsy but working solution.
Suggestions are welcome.
# Delete range of characters: from the first after last slash to EOL
# If the range is empty, remove '/' and invokes itself again
function clear-until-slash () {
local x0=$CURSOR
zle -U /
zle vi-find-prev-char-skip
local x1=$CURSOR
[ $x1 -eq 0 ] && { zle beep; return; }
if [ $x0 -eq $x1 ]; then
zle backward-delete-char
clear-until-slash
fi
RBUFFER=""
}
zle -N clear-until-slash
bindkey "\ew" clear-until-slash
--
Emacs is a nice OS - but it lacks a good text editor.
That's why I am using Vim.
--Anonymous
Messages sorted by:
Reverse Date,
Date,
Thread,
Author