zshrc config for home and end keys

posted on 02:41 PM on Tuesday 13 July 2021

I like to use the home and end keys to move to the start end the end of the line. With zsh being the default in Mac OS Catalina and greater, the following needs to be added to ~/.zshrc.

# use home and end key
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line

This was based on https://apple.stackexchange.com/questions/372386/i-switched-to-catalina-and-enabled-zsh-now-my-home-end-key-do-not-work-in-termin and it works for me.

bernett.net