I use iTerm as my default terminal software and use the zsh terminal. I recently learned that it uses the emacs bindings by default. So this is how I have to get around the text in my terminal:
Command | Description |
---|---|
control+a |
gets you to the beginning of the text. |
control+e |
get you to the end of the text. |
But I use Vim bindings in intelliJ and when I learned I can use the same commands in my terminal, I jumped with joy. To enable the vim bindings, add the following line to your .zshrc
file:
bindkey -v
Reload your shell and voila, you will have vim bindings in the shell.