zsh-workers
 help / color / mirror / code / Atom feed
From: Nathan Phillip Brink <ohnobinki@ohnopublishing.net>
To: zsh-workers@zsh.org
Subject: emacs-forward-word not emacs-like
Date: Wed, 21 Oct 2020 03:28:02 +0000	[thread overview]
Message-ID: <20201021032801.GA1808@gibby.ohnopub.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]

Hi,

I was trying out zsh due to it being the default/recommended shell on
Mac OS X:

binki@Nathans-Air ~ % zsh --version
zsh 5.7.1 (x86_64-apple-darwin19.0)

I checked the reslease notes for 5.8 and did not see anything
obviously related to my issue.

I was trying to write input to a line and move my cursor about using
M-f and M-b and deleting chunks at a time with M-d. I found that these
behave differently from Emacs and bash. When researching this, I came
across https://unix.stackexchange.com/a/106380 . However, the bindings
suggested there do not behave the same. Consider the following input
text:

a-b-c d-e-f

If my cursor is positioned at ‘a’ and I press M-f, bash and Emacs
will move the cursor to point to the first dash ‘-’ (dash) (i.e., to
immediately after the ‘a’). zsh’s emacs-forward-word will instead
position the cursor immediately after ‘c’. M-b mapped to
emacs-backward-word and M-d mapped to kill-word suffer from the same
issue where dashes and other punctuation(?) are incorrectly considered
to be word characters.

Since I am so used to the behavior of Emacs and bash, this divergent
behavior of zsh for these keys is really disruptive.

Is there a way to get Emacs/bash-style cursor movement for these
bindings? Could an emacs-kill-word be added along with
emacs-emacs-forward-word and emacs-emacs-backward-word which actually
behave more like Emacs or something? Would such a patch be accepted?
Is thre a way to get this behavior with bindings to a script?

Please CC me on replies as I am not subscribed. Thanks!

-- 
binki

Don’t forget to check for missing or extraneous apostrophes!

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2020-10-21  3:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21  3:28 Nathan Phillip Brink [this message]
2020-10-21  3:35 ` Lawrence Velázquez
2020-10-21 20:29 ` Bart Schaefer

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=20201021032801.GA1808@gibby.ohnopub.net \
    --to=ohnobinki@ohnopublishing.net \
    --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).