In bash, you can kill words (Alt-Backspace) or lines (Ctrl-k), and yank them back later with C-y, and cycling the kill-ring with Alt-y.
Now when I'm using zsh, it is weird that Alt-y is not working (nothing happens when I press it), although I've set it to use emacs keybindings (bindkey -e).
Any ideas how to fix it?
zsh --version
returns 4.3.12
bindkey | grep yank
shows that yank-pop is already bound to ^[y (Alt-y).
UPDATED: debugging results
A. How do I test that Alt-y is not working?
- I type 'abc'
- I kill it by pressing
Alt-Backspace
- I type 'efg'
- I kill it again by Alt-Backspace
- I press
Ctrl-y
to yank it back - and I got 'efg' - I press
Alt-y
- and I should have got 'abc', but it remained as 'efg' - nothing happened.
B. M-x yank-pop
is not working either.
C. I run zsh -f
and bindkey -e
. Then I try the debug process again - it works this time!
So I guess there must be something wrong with my .zshrc - I'm gonna bisect it out.
One ore thing to mention: I'm using the oh-my-ssh
package with the following plugins enabled: git django extract gem heroku history-substring-search pip rvm
Thanks Gilles for the zsh -f
trick - I didn't realize that the problem was in the configuration files.
zsh -f
? How exactly do you determine thatM-y
isn't working? What aboutM-x yank-pop
?pacman -S
2. I've edited my question to include the debug results. Thanks very much.