[mac] 如何在 zsh 中按下 alt 時移動一個單詞

  1. 首先編輯你的 ~/.zshrc 設定檔,加上以下設定
....
# move across word
bindkey "^[[1;3C" forward-word
bindkey "^[[1;3D" backward-word
....

接著重新套用 zsh 設定即可

source ~/.zshrc

參考資料:

https://stackoverflow.com/questions/12382499/looking-for-altleftarrowkey-solution-in-zsh

Leave a Reply