Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: default vi-mode key bindings
- X-seq: zsh-workers 33856
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: default vi-mode key bindings
- Date: Fri, 05 Dec 2014 14:26:02 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1417785963; bh=MJr7UN+43YG7qGbSTDwyyc4Z92If7JcK3AayTtnfyzk=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=bsCXS8AhEvJ2zKtLnFqR9JsQi9kCa9GCtpnTA2KQuRATmM66uJKS7RIliT10f9i0zMx2y2n44Jvk8FXVJ6bn+EvyXEazb1zPFFzTl8qN6dROAr3665AUcyy/RHw+fJ9QlA0NbZqecPInB9J/nyUimY4KB+ddRW9QWKKMP76Gtk9vOm/O7Xo6PK9vuVxs360fs6EdVv9+cHO3YJfOASLlMRG/PhZl0SUYJmKWX3YTQPtgXABWmwKISOSy1zBSP5sUSwfIy0YIezEdGxHLHq2K2h2piITE5jwXQKLBXCKlyZUkgzyqkSBrhOQ1FaXFVu5CJgkpS3DQ4dG/3vCw0wFncw==
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.co.uk; b=CILZaXUM2yINafYfN4202Z8pALtk2Ep66SSSgZnWLeV5zaI5F28YT3mlVnhRC0zmEkC+WA8qUoAGXA3zJKE5pDETmxV4Rxdeu8mZkuumhsqilTBIRVhAJy7HcZHwTsirybnxTeNb2wdTJ3HlqKuV+dqrX+waJCKGsWVSXKWFQQNW9Ncr+1TNVLN4Y0WdbgAw4xpK6cO7s/G9mQE5Igd7QWY22RAm4owCikxiULHrONvkaSZFWR8lcbyF8xTm6dAt3uXImCwP5EoCPU7+WvZfi6mYeBkzWnT0R2m5yk1AKTYqFMfMm9aQtJ/z82lf1O2K4sjEgaqaEPAi2qPoViqgIg==;
- In-reply-to: <141204231735.ZM9532@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <17052.1417717710@thecus.kiddle.eu> <141204231735.ZM9532@torch.brasslantern.com>
Bart wrote:
>
> I will bow to the majority opinion on this because I rarely use vi-mode
> in zsh, but I will say that I have lost more work to vim's multi-level
> undo than to practically any other catastrophe I can think of.
I can see that being a problem if you haven't learnt the key for redo
and hit undo several times before you realise what's going on.
The type of person that would affect would need to like vi-style editing
enough to use it in zsh without having ever been tempted into learning
vim. Plenty of people use vi for quick edits from the terminal but use
something else like emacs, eclipse, nedit or whatever for longer editing
sessions. I'd guess that most such people use emacs mode on zsh. It's
hard to find out for sure other than by breaking things. A quick sneak
peak in the .zshrc/.vimrc of the three vim and zsh using people who work
at the same place as me show that they have all left the default of
vi-undo-change. None have put vim in vi-compatible mode.
> This is probably because my fingers are conditioned by so many years of
> using vi before vim even existed.
Since, getting used to vim, I've found that I never use the line undo
with U anymore. Zsh doesn't support that.
> } The other keys are all vim bindings starting with a g prefix.
>
> Maybe the thing to do here is to create a new keymap with vim bindings?
That might sooner lead to calls to support dozens of other editors in
that manner which is the sort of thing better handled by an oh-my-zsh
style plugin.
It also wouldn't work for some vim features like the additional special
marks and registers. vi didn't leave a lot of keys free so most extra
vim functions start with either g or z and can be unbound in one
command. Checking :help compatible, the undo is the most significant vim
behaviour difference. There's also backspacing over newlines and the
start of an insertion, some vi movements going to the start of a line
and cursors working in insert mode.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author