zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@zagzig.brasslantern.com>
To: zsh-workers@math.gatech.edu
Subject: Re: kill-word & friends in ZLE
Date: Wed, 15 May 1996 16:47:50 -0700	[thread overview]
Message-ID: <960515164750.ZM16606@candle.brasslantern.com> (raw)
In-Reply-To: Hrvoje.Niksic@public.srce.hr (Hrvoje Niksic) "kill-word & friends in ZLE" (May 16,  1:02am)

On May 16,  1:02am, Hrvoje Niksic wrote:
} Subject: kill-word & friends in ZLE
}
} It is quite irritating for me that in zsh's Emacs mode functions like
} backward-kill-word and similar behave in a different fashion. Examples:
} 
} fly% cd /usr/local/lib/gwembljh[Esc-Backspace]
} 
} and everything is erased, instead of just gwembljh. The same applies for
} {backward,forward}-word.

An annoying effect of removing '/' from WORDCHARS is:

	diff -u /usr/tmp/foo
			    ^
			    With cursor here, press alt-backspace
			    four times.
	diff 
             ^
	     Cursor is now here.  I really didn't want to erase the -u,
	     just up through the slash.

My fingers just don't let go of the alt key automatically enough when I
get down to only the single slash.

If I switch to vi-backward-kill-word, then you have to press ctrl-W *six*
times to erase the whole path.  Using kill-word to erase a single slash
seems far too jerky, except when the slash is by itself.

What I really want is for the word-erase to treat a trailing slash (or
one all by itself) as part of a word, but to treat a leading or embedded
slash as a word boundary.

I'd settle for this:

	diff -u /usr/tmp/foo
			    ^
			    With cursor here, something-kill-word
			    leaves you with:
	diff -u /usr/tmp
			^
			Cursor here.  Two more kills leave:
	diff -u
	       ^
	       Cursor here.

I.e., consume the word *and* the non-word to its left, up to the end of
the previous word.  (The emacs behavior is to first kill the non-word
at the *right* and then kill the word.)  Its much easier to retype the
space or slash than to retype an entire accidentally-killed word.

Yes, I know this is neither emacs behavior nor vi behavior, but it would
be nice if there were some way it could be programmed.

Another satisifactory option would be something like "yank-word", so I
could yank back the most-recently-killed word, rather the whole line,
when I accidentally press alt-backspace once too often.

Oh, well, I'm just grumbling.

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"



  parent reply	other threads:[~1996-05-16  1:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-15 23:02 Hrvoje Niksic
1996-05-15 23:18 ` Zefram
1996-05-16 14:56   ` Mike Kazda
1996-05-16 17:09     ` Barton E. Schaefer
1996-05-15 23:47 ` Bart Schaefer [this message]
1996-05-16  1:12   ` Wayne Davison
     [not found]     ` <wayne@clari.net>
1996-05-16  0:49       ` Bart Schaefer
1996-05-16 22:17         ` Wayne Davison
1996-05-16 12:00   ` Hrvoje Niksic

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=960515164750.ZM16606@candle.brasslantern.com \
    --to=schaefer@zagzig.brasslantern.com \
    --cc=schaefer@nbn.com \
    --cc=zsh-workers@math.gatech.edu \
    /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).