### Install with Zinit Source: https://github.com/zsh-users/zsh-history-substring-search/blob/master/README.md Loads the plugin using Zinit, including configuration for immediate loading. ```shell zinit snippet OMZ::plugins/git/git.plugin.zsh` zinit load 'zsh-users/zsh-history-substring-search' zinit ice wait atload'_history_substring_search_config' exec zsh ``` -------------------------------- ### Install with antigen Source: https://github.com/zsh-users/zsh-history-substring-search/blob/master/README.md Installs the plugin using antigen and configures key bindings. ```shell antigen bundle zsh-users/zsh-history-substring-search antigen apply # zsh-history-substring-search configuration bindkey '^[[A' history-substring-search-up # or '\eOA' bindkey '^[[B' history-substring-search-down # or '\eOB' HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1 ``` -------------------------------- ### Install with zplug Source: https://github.com/zsh-users/zsh-history-substring-search/blob/master/README.md Adds the plugin to your .zshrc for installation with zplug. ```shell zplug "zsh-users/zsh-history-substring-search", as: plugin ``` -------------------------------- ### Install with Homebrew Source: https://github.com/zsh-users/zsh-history-substring-search/blob/master/README.md Installs the plugin using Homebrew and adds it to your .zshrc. ```shell brew install zsh-history-substring-search echo 'source $(brew --prefix)/share/zsh-history-substring-search/zsh-history-substring-search.zsh' >> ~/.zshrc ``` -------------------------------- ### Install with Oh-my-zsh Source: https://github.com/zsh-users/zsh-history-substring-search/blob/master/README.md Clones the repository and activates the plugin in oh-my-zsh's custom plugins directory. ```shell git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search plugins=( [plugins...] zsh-history-substring-search) exec zsh ``` -------------------------------- ### Load Order with zsh-syntax-highlighting Source: https://github.com/zsh-users/zsh-history-substring-search/blob/master/README.md Ensures correct loading order when using zsh-syntax-highlighting by loading it before this script. ```shell source zsh-syntax-highlighting.zsh source zsh-history-substring-search.zsh ``` -------------------------------- ### Load and Bind Keys Source: https://github.com/zsh-users/zsh-history-substring-search/blob/master/README.md Loads the script and binds UP/DOWN arrow keys for history substring search. Use `cat -v` or ``/`` to find correct key codes if defaults don't work. ```shell source zsh-history-substring-search.zsh bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down ``` ```shell bindkey "$terminfo[kcuu1]" history-substring-search-up bindkey "$terminfo[kcud1]" history-substring-search-down ``` -------------------------------- ### Bind Keys for VI Mode Source: https://github.com/zsh-users/zsh-history-substring-search/blob/master/README.md Binds 'k' and 'j' keys for history substring search in VI mode. ```shell bindkey -M vicmd 'k' history-substring-search-up bindkey -M vicmd 'j' history-substring-search-down ``` -------------------------------- ### Bind Keys for EMACS Mode Source: https://github.com/zsh-users/zsh-history-substring-search/blob/master/README.md Binds Control-P and Control-N keys for history substring search in EMACS mode. ```shell bindkey -M emacs '^P' history-substring-search-up bindkey -M emacs '^N' history-substring-search-down ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.