zsh-workers
 help / color / mirror / code / Atom feed
* emacs-forward-word not emacs-like
@ 2020-10-21  3:28 Nathan Phillip Brink
  2020-10-21  3:35 ` Lawrence Velázquez
  2020-10-21 20:29 ` Bart Schaefer
  0 siblings, 2 replies; 3+ messages in thread
From: Nathan Phillip Brink @ 2020-10-21  3:28 UTC (permalink / raw)
  To: zsh-workers

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-21 20:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21  3:28 emacs-forward-word not emacs-like Nathan Phillip Brink
2020-10-21  3:35 ` Lawrence Velázquez
2020-10-21 20:29 ` Bart Schaefer

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).