summaryrefslogtreecommitdiff
path: root/zsh/keys.zsh
diff options
context:
space:
mode:
authorNick Shipp <nick@shipp.ninja>2017-02-14 08:41:16 -0500
committerNick Shipp <nick@shipp.ninja>2017-02-14 08:41:16 -0500
commit24a605577c8e09a75f8f717f9df1bdc6c8dd8ec3 (patch)
tree794db72af4e1ddf41cff2d1f6371b27103562d69 /zsh/keys.zsh
initial commit
Diffstat (limited to 'zsh/keys.zsh')
-rw-r--r--zsh/keys.zsh18
1 files changed, 18 insertions, 0 deletions
diff --git a/zsh/keys.zsh b/zsh/keys.zsh
new file mode 100644
index 0000000..f095954
--- /dev/null
+++ b/zsh/keys.zsh
@@ -0,0 +1,18 @@
+KBDFILE=$ZDOTDIR/zkbd/$TERM-$VENDOR-$OSTYPE
+
+[[ -f $KBDFILE ]] && source $KBDFILE
+
+[[ -n ${key[Left]} ]] && bindkey "${key[Left]}" backward-char
+[[ -n ${key[Right]} ]] && bindkey "${key[Right]}" forward-char
+[[ -n ${key[Backspace]} ]] && bindkey "${key[Backspace]}" backward-delete-char
+[[ -n ${key[Delete]} ]] && bindkey "${key[Delete]}" delete-char
+[[ -n ${key[Up]} ]] && bindkey "${key[Up]}" up-line-or-search
+[[ -n ${key[Down]} ]] && bindkey "${key[Down]}" down-line-or-search
+[[ -n ${key[Home]} ]] && bindkey "${key[Home]}" beginning-of-line
+[[ -n ${key[End]} ]] && bindkey "${key[End]}" end-of-line
+
+# MOUSES
+[[ -n ${key[ScrollUp]} ]] && bindkey "${key[ScrollUp]}" up-history
+[[ -n ${key[ScrollDown]} ]] && bindkey "${key[ScrollDown]}" down-history
+
+bindkey '^R' history-incremental-search-backward