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/
|
zplug/
|
||||||
|
terminfo_dump.txt
|
||||||
|
@ -1,23 +1,26 @@
|
|||||||
# Part of this is from http://unix.stackexchange.com/q/62919
|
#
|
||||||
# Fixes my navigation keys
|
# Terminal quirks
|
||||||
#typeset -A key
|
#
|
||||||
#key[Home]=${terminfo[khome]}
|
|
||||||
#key[End]=${terminfo[kend]}
|
# Reclaim Ctrl-S and Ctrl-Q
|
||||||
#key[Insert]=${terminfo[kich1]}
|
stty -ixon
|
||||||
#key[Delete]=${terminfo[kdch1]}
|
stty -ixoff
|
||||||
#key[Up]=${terminfo[kcuu1]}
|
|
||||||
#key[Down]=${terminfo[kcud1]}
|
# Emacs mode pls
|
||||||
#key[Left]=${terminfo[kcub1]}
|
bindkey -e
|
||||||
#key[Right]=${terminfo[kcuf1]}
|
|
||||||
#key[PageUp]=${terminfo[kpp]}
|
# Insert, delete, home, end
|
||||||
#key[PageDown]=${terminfo[knp]}
|
bindkey "\e[2~" overwrite-mode
|
||||||
#[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
|
bindkey "\e[3~" delete-char
|
||||||
#[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
|
bindkey "\e[H" beginning-of-line
|
||||||
#[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
|
bindkey "\e[F" end-of-line
|
||||||
#[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
|
|
||||||
#[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history
|
# rxvt-unicode specials
|
||||||
#[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history
|
bindkey "\e[7~" beginning-of-line
|
||||||
#[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
|
bindkey "\e[8~" end-of-line
|
||||||
#[[ -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
|
#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