DEV Community

Terry Li
Terry Li

Posted on

Most used ZSH shortcuts for moving cursor

I use iterm2 + zsh to deal with all the command lines. Here I want to share my most used shortcuts for moving cursor.

ctrl + a  move to the beginning of the line
ctrl + e  move to the end of the line

alt + f   move to the next word
alt + b   move to the previous word

ctrl + k  cut till the end of the line
alt + w   cut till the beginning of the line

ctrl + w  cut the previous word
alt + d   cut the next word 
Enter fullscreen mode Exit fullscreen mode

Bonus

ctrl + -  undo previous change
Enter fullscreen mode Exit fullscreen mode

This is it. Hope you enjoy it!

Top comments (0)