changeset 531:5d57fac601e3

Add zsh autosuggest plugin
author zegervdv <zegervdv@me.com>
date Sun, 23 Jan 2022 11:43:54 +0100
parents 5e6d724bcd65
children e932c2076dba
files .chezmoiexternal.toml dot_zshrc
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.chezmoiexternal.toml	Sun Jan 23 11:36:16 2022 +0100
+++ b/.chezmoiexternal.toml	Sun Jan 23 11:43:54 2022 +0100
@@ -28,3 +28,8 @@
   type = "file"
   url = "https://github.com/zsh-users/zsh-history-substring-search/raw/master/zsh-history-substring-search.zsh"
   refreshPeriod = "168h"
+
+[".zsh/zsh-autosuggestions.zsh"]
+  type = "file"
+  url = "https://github.com/zsh-users/zsh-autosuggestions/raw/master/zsh-autosuggestions.zsh"
+  refreshPeriod = "168h"
--- a/dot_zshrc	Sun Jan 23 11:36:16 2022 +0100
+++ b/dot_zshrc	Sun Jan 23 11:43:54 2022 +0100
@@ -3,6 +3,8 @@
 source ~/.zsh/zsh-history-substring-search.zsh
 export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=green,fg=black'
 
+source ~/.zsh/zsh-autosuggestions.zsh
+
 export TERM=xterm-256color
 
 export LC_ALL=$LANG
@@ -67,6 +69,8 @@
 bindkey '^p' history-substring-search-up
 bindkey '^n' history-substring-search-down
 
+bindkey '^ ' autosuggest-accept
+
 export LESS_TERMCAP_mb=$(printf "\e[1;31m")
 export LESS_TERMCAP_md=$(printf "\e[1;31m")
 export LESS_TERMCAP_me=$(printf "\e[0m")