Last active
November 17, 2015 10:33
-
-
Save gofer/7ce6e937fc6fb614bf5a to your computer and use it in GitHub Desktop.
key binds for zsh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Bind key ### | |
# Linux | |
if [ `uname -a | grep 'Linux' | wc -c` -ne 0 ]; then | |
if [ -n "${TMUX}" ]; then | |
bindkey "^[[1~" beginning-of-line | |
bindkey "^[[4~" end-of-line | |
else | |
bindkey "^[[H" beginning-of-line | |
bindkey "^[[F" end-of-line | |
fi | |
bindkey "^[[3~" delete-char | |
bindkey "^[[2~" overwrite-mode | |
bindkey "^[[5~" up-line-or-history | |
bindkey "^[[6~" down-line-or-history | |
fi | |
# tmux on cygwin | |
if [ `uname -a | grep 'Cygwin' | wc -c` -ne 0 ]; then | |
if [ -n "${TMUX}" ]; then | |
bindkey "^[[1~" beginning-of-line | |
bindkey "^[[4~" end-of-line | |
else | |
bindkey "^[[H" beginning-of-line | |
bindkey "^[[F" end-of-line | |
fi | |
bindkey "^[[3~" delete-char | |
bindkey "^[[2~" overwrite-mode | |
bindkey "^[[5~" up-line-or-history | |
bindkey "^[[6~" down-line-or-history | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment