From 06b0c7eb739fd430aacbb46f183cea4aaf17300a Mon Sep 17 00:00:00 2001
From: Timmy Keller <tjk@tjkeller.xyz>
Date: Sun, 17 Apr 2022 10:46:33 -0500
Subject: small changes to zsh and st configsa

---
 zsh/zscripts/keybindrc.zsh | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)

(limited to 'zsh/zscripts/keybindrc.zsh')

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
-- 
cgit v1.2.3