Looking for ALT+LeftArrowKey solution in zsh

后端 未结 10 880
孤街浪徒
孤街浪徒 2021-01-29 18:13

I just recently switched from bash to zsh, however I miss my Alt+LeftArrowKey and Alt+RightArrowKey to go back and forth a word at a

10条回答
  •  渐次进展
    2021-01-29 18:29

    To make it work for me I used this answer, however I had to swap the codes (left <-> right)

    ⌥+← Send Hex Codes: 0x1b 0x66
    ⌥+→ Send Hex Codes: 0x1b 0x62

    and add the following to my ~/.zshrc

    bindkey -e
    bindkey "^[b" forward-word
    bindkey '^[f' backward-word
    

提交回复
热议问题