summaryrefslogtreecommitdiff
path: root/zsh/zscripts/keybindrc.zsh
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2022-04-17 10:46:33 -0500
committerTimmy Keller <tjk@tjkeller.xyz>2022-04-17 10:46:33 -0500
commit06b0c7eb739fd430aacbb46f183cea4aaf17300a (patch)
treeb87398a7ed71ed22d4c43c42f274fbff12c1d578 /zsh/zscripts/keybindrc.zsh
parentaff2302d113a71aee647ab71336e8d68bb844653 (diff)
downloaddotconfig-06b0c7eb739fd430aacbb46f183cea4aaf17300a.tar.xz
dotconfig-06b0c7eb739fd430aacbb46f183cea4aaf17300a.zip
small changes to zsh and st configsa
Diffstat (limited to 'zsh/zscripts/keybindrc.zsh')
-rwxr-xr-xzsh/zscripts/keybindrc.zsh34
1 files changed, 19 insertions, 15 deletions
diff --git a/zsh/zscripts/keybindrc.zsh b/zsh/zscripts/keybindrc.zsh
index 90c1e16..29913ae 100755
--- a/zsh/zscripts/keybindrc.zsh
+++ b/zsh/zscripts/keybindrc.zsh
@@ -8,20 +8,24 @@ export KEYTIMEOUT=1
#bindkey -r "^U" "^W" "^G" "^J" "^Q" "^R" "^[[200~"
# Keybindings
-#autoload edit-command-line; zle -N edit-command-line # Edit line in Vim buffer
-#bindkey "^E" edit-command-line # Ctrl-e - edit line in Vim buffer
-bindkey "^[[H" beginning-of-line # Home Key
-bindkey "^[[4~" end-of-line # End Key
-bindkey "^[[P" delete-char # Delete Key
-bindkey "^[[4h" overwrite-mode # Insert Key
-bindkey "^D" kill-whole-line # Ctrl-d - delete line
-bindkey "^X" clear-screen # Ctrl-x - clear screen
-bindkey "^H" backward-delete-word # Ctrl-Backspace - delete entire word behind cursor
-bindkey "^[[M" delete-word # Ctrl-Delete - delete currect word in front of the cursor
-bindkey "^[[1;5D" emacs-backward-word # Ctrl-Right - go back one word
-bindkey "^[[1;3D" emacs-backward-word # Alt-Right - go back one word
-bindkey "^[[1;5C" emacs-forward-word # Ctrl-Left - go forward one word
-bindkey "^[[1;3C" emacs-forward-word # Alt-Left - go forward one word
+autoload edit-command-line; zle -N edit-command-line # Edit line in Vim buffer
+bindkey '^E' edit-command-line # Ctrl-e - edit line in Vim buffer
+bindkey '^[[H' beginning-of-line # Home Key
+bindkey '^[[4~' end-of-line # End Key
+bindkey '^[[P' delete-char # Delete Key
+bindkey '^[[4h' overwrite-mode # Insert Key
+bindkey '^D' kill-whole-line # Ctrl-d - delete line
+bindkey '^X' clear-screen # Ctrl-x - clear screen
+bindkey '^H' backward-delete-word # Ctrl-Backspace - delete entire word behind cursor
+bindkey '^[[M' delete-word # Ctrl-Delete - delete currect word in front of the cursor
+# History completion
+bindkey '\e[A' history-search-backward # Up arrow - seach history backwards
+bindkey '\e[B' history-search-forward # Down arrow - seach history forwards
+# Ctrl-vi keys emulate arrow keys
+bindkey '^H' emacs-backward-word # Ctrl-L - go back one word
+bindkey '^J' history-search-forward # Ctrl-J - seach history backwards
+bindkey '^K' history-search-backward # Ctrl-K - seach history forwards
+bindkey '^L' emacs-forward-word # Ctrl-H - go forward one word
# Basic auto/tab complete
autoload -U compinit
@@ -30,7 +34,7 @@ zmodload zsh/complist
compinit -d "$XDG_CACHE_HOME/zcompdump" # Change where .zcompdump is stored
_comp_options+=(globdots) # Include hidden files.
-# Use ctrl+vi keys in tab complete menu
+# Use ctrl-vi keys in tab complete menu
bindkey -M menuselect '^h' vi-backward-char
bindkey -M menuselect '^k' vi-up-line-or-history
bindkey -M menuselect '^l' vi-forward-char