Skip to content

Instantly share code, notes, and snippets.

@ejalaa12
Created December 28, 2016 19:00
Show Gist options
  • Save ejalaa12/0671e8d232beb33ea1f4f1453bf7f2b5 to your computer and use it in GitHub Desktop.
Save ejalaa12/0671e8d232beb33ea1f4f1453bf7f2b5 to your computer and use it in GitHub Desktop.
Key binding for zsh

Run cat then press keys to see the codes your shortcut send.
(Press Ctrl+C to kill the cat when you're done.)
For me, (ubuntu, konsole, xterm) pressing Alt + <- sends ^[[1;3D, so i would put in my .zshrc

bindkey "^[[1;3C" forward-word
bindkey "^[[1;3D" backward-word

(Actually I prefer to use Ctrl + arrow to move word by word, like in a normal textbox under windows or linux gui.)

Related question: http://stackoverflow.com/questions/8638012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment