Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: vi-mode zle: how to delete past the start char of insert mode (like VIM 'backspace'=start option)
- X-seq: zsh-users 14436
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: vi-mode zle: how to delete past the start char of insert mode (like VIM 'backspace'=start option)
- Date: Sun, 27 Sep 2009 18:43:56 +0100
- Cc: Anton Sharonov <anton.sharonov@xxxxxxxxx>
- In-reply-to: <ef9dd2250909270703v7d7dfd45hfdf3e9750afa020f@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <ef9dd2250909270703v7d7dfd45hfdf3e9750afa020f@xxxxxxxxxxxxxx>
On Sun, 27 Sep 2009 16:03:53 +0200
Anton Sharonov <anton.sharonov@xxxxxxxxx> wrote:
> How can I tell zshzle that I like to be able to delete past the
> point of _start_ of the insert mode ?
Replace the "vi-" style bindings with the non-vi equivalents, which
don't care about the insertion point.
bindkey -M viins '^h' backward-delete-char
bindkey -M viins '^?' backward-delete-char
bindkey -M viins '^w' backward-kill-word
etc.
You can be a bit smarter by replacing the widgets themselves,
zle -A .backward-kill-word vi-backward-kill-word
zle -A .backward-delete-char vi-backward-delete-char
which means you don't need to worry about what they're bound to them.
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author