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
ctrl + - undo previous change
This is it. Hope you enjoy it!