From 4be584fc168acc0f120ebb46e89a6a9492178926 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Tue, 25 Feb 2014 01:32:49 +0000 Subject: [PATCH] Add zsh-autosuggestions --- .gitmodules | 3 +++ shell/zsh/zsh-autosuggestions | 1 + shell/zshrc.sh | 17 +++++++++++++++++ 3 files changed, 21 insertions(+) create mode 160000 shell/zsh/zsh-autosuggestions diff --git a/.gitmodules b/.gitmodules index e906131..37eb79c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,3 +22,6 @@ [submodule "tmux/themes"] path = tmux/themes url = git@github.com:jimeh/tmux-themepack.git +[submodule "shell/zsh/zsh-autosuggestions"] + path = shell/zsh/zsh-autosuggestions + url = git@github.com:tarruda/zsh-autosuggestions.git diff --git a/shell/zsh/zsh-autosuggestions b/shell/zsh/zsh-autosuggestions new file mode 160000 index 0000000..ebe4cf2 --- /dev/null +++ b/shell/zsh/zsh-autosuggestions @@ -0,0 +1 @@ +Subproject commit ebe4cf251a77b50da43aa040b5869b5a286e06ce diff --git a/shell/zshrc.sh b/shell/zshrc.sh index 0add897..42fdee3 100644 --- a/shell/zshrc.sh +++ b/shell/zshrc.sh @@ -68,3 +68,20 @@ bindkey -s "\C-x\C-f" "cd " ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets) source "$DOTZSH/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" + + +# +# Z-Shell Autosuggestions +# + +source "$DOTZSH/zsh-autosuggestions/autosuggestions.zsh" + +# Enable autosuggestions automatically +zle-line-init() { + zle autosuggest-start +} +zle -N zle-line-init + +# use ctrl+t to toggle autosuggestions(hopefully this wont be needed as +# zsh-autosuggestions is designed to be unobtrusive) +bindkey '^T' autosuggest-toggle