* Comand-line editing
@ 2002-01-19 8:48 Jesper Holmberg
2002-01-19 18:36 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Jesper Holmberg @ 2002-01-19 8:48 UTC (permalink / raw)
To: Zsh-users List
With Emacs key bindings, the use of C-space and M-w makes it possible to
"copy and paste" (yank) a part of the already written line. Is there also
a way to "cut" the selected part?
In Emacs, this would be with C-w, but this is "delete word" with the
default bindings in zsh. How can I do this?
TIA,
Jesper
--
Jesper Holmberg |"But how can |
jesper.holmberg@enst-bretagne.fr | one be warm |
ENST Br, BP 832, 29285 Brest, FRANCE | alone?" |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Comand-line editing
2002-01-19 8:48 Comand-line editing Jesper Holmberg
@ 2002-01-19 18:36 ` Bart Schaefer
2002-01-19 22:42 ` Jesper Holmberg
0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2002-01-19 18:36 UTC (permalink / raw)
To: Jesper Holmberg, Zsh-users List
On Jan 19, 9:48am, Jesper Holmberg wrote:
}
} In Emacs, [kill-region] would be with C-w, but this is [kill-word] with
} the default bindings in zsh. How can I do this?
Do you mean, "How can I do this without re-binding C-w?"
M-x kill-region RET
Do you mean, "How can I re-bind C-w to do this?"
bindkey '\C-w' kill-region
It should be obvious how to bind some other key to kill-region.
Note that this may have some unexpected behavior, because the mark is
always implicitly set to the beginning of the current command line; so
if you've not typed C-space, kill-region acts like backward-kill-line.
The reason C-w is kill-word in the default bindings is for compatibility
with the default settings of the old BSD Unix TTY driver, but of course
GNU readline (hence bash) does the same, so it's probably too late to
change it now.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Comand-line editing
2002-01-19 18:36 ` Bart Schaefer
@ 2002-01-19 22:42 ` Jesper Holmberg
0 siblings, 0 replies; 3+ messages in thread
From: Jesper Holmberg @ 2002-01-19 22:42 UTC (permalink / raw)
To: Zsh-users List
* On Sat Jan 19, Bart Schaefer wrote:
> Do you mean, "How can I do this without re-binding C-w?"
>
> M-x kill-region RET
Oh, I had no idea you could use emacs-style long commands in the line
editor. Thank you, that was just what I was looking for.
Jesper
--
Jesper Holmberg |"But how can |
jesper.holmberg@enst-bretagne.fr | one be warm |
ENST Br, BP 832, 29285 Brest, FRANCE | alone?" |
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-01-19 22:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-19 8:48 Comand-line editing Jesper Holmberg
2002-01-19 18:36 ` Bart Schaefer
2002-01-19 22:42 ` Jesper Holmberg
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).