DEV Community

loading...

Most used ZSH shortcuts for moving cursor

terrytyli profile image Terry Li ・1 min read

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!

Discussion (1)

pic
Editor guide
Collapse
trevoropiyo profile image
Trevor Opiyo

I have been searching all over for a concise list of these shortcuts. Thanks for the post.