I recently switch from bash to zsh shell. To be more precise, the oh-my-zsh Very nice, but the shortcut I most often use; jumping to the beginning/end of the line doesn't work anymore. From the docs it should be
ctrl + A --> beginning ctrl + E --> end
However, when I do that I get the following
$~> my-command $~> my-command^A # did a ctrl + A here
Although I see this working by everybody else, on my system something seems to be different. Any suggestions what that might be ?
Pressing Enter on an empty line: execute: _ zsh: do you wish to see all 373 possibilities (64 lines)? In other shells, Alt + X brings the same behavior, except that Ctrl + C cancels the prompt.
Alt+T: Swap the current word with the previous word. Ctrl+T: Swap the last two characters before the cursor with each other. You can use this to quickly fix typos when you type two characters in the wrong order.
If you're wondering why this happened: You likely have $EDITOR
or $VISUAL
set to vi/vim which made zsh default to the vi keymap which doesn't use ctrl+a for moving the caret.
Adding bindkey -e
to ~/.zshrc
will restore the old behavior (emacs keymap).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With