Fix keys on xterm* terminals
This commit is contained in:
parent
3330d21509
commit
f33f61c823
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
*~
|
||||
.*
|
||||
zplug/
|
||||
terminfo_dump.txt
|
||||
|
@ -1,23 +1,26 @@
|
||||
# Part of this is from http://unix.stackexchange.com/q/62919
|
||||
# Fixes my navigation keys
|
||||
#typeset -A key
|
||||
#key[Home]=${terminfo[khome]}
|
||||
#key[End]=${terminfo[kend]}
|
||||
#key[Insert]=${terminfo[kich1]}
|
||||
#key[Delete]=${terminfo[kdch1]}
|
||||
#key[Up]=${terminfo[kcuu1]}
|
||||
#key[Down]=${terminfo[kcud1]}
|
||||
#key[Left]=${terminfo[kcub1]}
|
||||
#key[Right]=${terminfo[kcuf1]}
|
||||
#key[PageUp]=${terminfo[kpp]}
|
||||
#key[PageDown]=${terminfo[knp]}
|
||||
#[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
|
||||
#[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
|
||||
#[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
|
||||
#[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
|
||||
#[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history
|
||||
#[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history
|
||||
#[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
|
||||
#[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
|
||||
#[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history
|
||||
#[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history
|
||||
#
|
||||
# Terminal quirks
|
||||
#
|
||||
|
||||
# Reclaim Ctrl-S and Ctrl-Q
|
||||
stty -ixon
|
||||
stty -ixoff
|
||||
|
||||
# Emacs mode pls
|
||||
bindkey -e
|
||||
|
||||
# Insert, delete, home, end
|
||||
bindkey "\e[2~" overwrite-mode
|
||||
bindkey "\e[3~" delete-char
|
||||
bindkey "\e[H" beginning-of-line
|
||||
bindkey "\e[F" end-of-line
|
||||
|
||||
# rxvt-unicode specials
|
||||
bindkey "\e[7~" beginning-of-line
|
||||
bindkey "\e[8~" end-of-line
|
||||
|
||||
|
||||
#echo -e "Terminal: ${TERM}\n" > "${ZSHUPER_DIR}/terminfo_dump.txt"
|
||||
#for key val in ${(kv)terminfo}; do
|
||||
# echo "${key} -> ${val}" >> "${ZSHUPER_DIR}/terminfo_dump.txt"
|
||||
#done
|
||||
|
Loading…
Reference in New Issue
Block a user