zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: default vi-mode key bindings
Date: Fri, 05 Dec 2014 14:26:02 +0100	[thread overview]
Message-ID: <21098.1417785962@thecus.kiddle.eu> (raw)
In-Reply-To: <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


  parent reply	other threads:[~2014-12-05 13:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04 18:28 Oliver Kiddle
2014-12-05  7:17 ` Bart Schaefer
2014-12-05  7:35   ` Mikael Magnusson
2014-12-05  7:56     ` Jan Larres
2014-12-05 13:26   ` Oliver Kiddle [this message]
2014-12-05 17:46     ` Ray Andrews
2014-12-05 17:59       ` Eric Cook
2014-12-05 18:04       ` richo
2014-12-05 18:55       ` Lawrence Velázquez
2014-12-05 20:29         ` vi mode question Ray Andrews
2014-12-05 21:04           ` Lawrence Velázquez
2014-12-06 22:09           ` Bart Schaefer
2014-12-06 22:44             ` Ray Andrews
2014-12-07  0:32               ` Christian Neukirchen
2014-12-07  5:02                 ` Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21098.1417785962@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).