From 77bf134492e258aa661264ffc90f0f28a3afa896 Mon Sep 17 00:00:00 2001 From: DustVoice Date: Fri, 24 Jan 2020 00:50:03 +0100 Subject: [PATCH] Add zsh-completions and modify keybindings --- .gitmodules | 21 ++++++++++++--------- .zsh/plugins/zsh-completions | 1 + .zshrc | 13 +++++-------- 3 files changed, 18 insertions(+), 17 deletions(-) create mode 160000 .zsh/plugins/zsh-completions diff --git a/.gitmodules b/.gitmodules index 772d8f2b..48221da8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,15 +4,18 @@ [submodule ".config/nvim"] path = .config/nvim url = git@github.com:DustVoice/nvim.git -[submodule ".zsh/plugins/zsh-vim-mode"] - path = .zsh/plugins/zsh-vim-mode - url = https://github.com/softmoth/zsh-vim-mode -[submodule ".zsh/plugins/zsh-autosuggestions"] - path = .zsh/plugins/zsh-autosuggestions - url = https://github.com/zsh-users/zsh-autosuggestions -[submodule ".zsh/plugins/zsh-syntax-highlighting"] - path = .zsh/plugins/zsh-syntax-highlighting - url = https://github.com/zsh-users/zsh-syntax-highlighting [submodule ".oh-my-zsh"] path = .oh-my-zsh url = https://github.com/ohmyzsh/ohmyzsh.git +[submodule ".zsh/plugins/zsh-vim-mode"] + path = .zsh/plugins/zsh-vim-mode + url = https://github.com/softmoth/zsh-vim-mode.git +[submodule ".zsh/plugins/zsh-autosuggestions"] + path = .zsh/plugins/zsh-autosuggestions + url = https://github.com/zsh-users/zsh-autosuggestions.git +[submodule ".zsh/plugins/zsh-syntax-highlighting"] + path = .zsh/plugins/zsh-syntax-highlighting + url = https://github.com/zsh-users/zsh-syntax-highlighting.git +[submodule ".zsh/plugins/zsh-completions"] + path = .zsh/plugins/zsh-completions + url = https://github.com/zsh-users/zsh-completions diff --git a/.zsh/plugins/zsh-completions b/.zsh/plugins/zsh-completions new file mode 160000 index 00000000..a6e641b9 --- /dev/null +++ b/.zsh/plugins/zsh-completions @@ -0,0 +1 @@ +Subproject commit a6e641b977373740e9744182e6fad9af9ff39bc5 diff --git a/.zshrc b/.zshrc index e2362a5c..0e46fa26 100644 --- a/.zshrc +++ b/.zshrc @@ -84,16 +84,13 @@ MODE_CURSOR_VISUAL="magenta steady block" # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. # plugins=(git) -plugins=(colored-man-pages colorize command-not-found git zsh-autosuggestions zsh-syntax-highlighting history-substring-search zsh-vim-mode) +plugins=(colored-man-pages colorize command-not-found git zsh-completions zsh-autosuggestions zsh-syntax-highlighting history-substring-search zsh-vim-mode) + +autoload -U compinit && compinit source $ZSH/oh-my-zsh.sh -bindkey -M vicmd 'K' history-substring-search-up -bindkey -M vicmd 'J' history-substring-search-down - -bindkey -M vicmd 'L' autosuggest-accept -bindkey -M vicmd 'H' autosuggest-clear -bindkey -M vicmd '$' autosuggest-accept -bindkey -M vicmd '0' autosuggest-clear +bindkey -M vicmd '^K' history-substring-search-up +bindkey -M vicmd '^J' history-substring-search-down gpg-connect-agent updatestartuptty /bye