rewrite zsh plugin as single widget

This commit is contained in:
thek4n 2024-12-19 13:33:55 +03:00
parent 91bafdb221
commit cfd6ddee0d
2 changed files with 11 additions and 3 deletions

View File

@ -82,4 +82,14 @@ cddotdot() {
} }
zle -N cddotdot zle -N cddotdot
bindkey "^O" cddotdot bindkey "^O" cddotdot
bindkey -M vicmd "^O" cddotdot bindkey -M vicmd "^O" cddotdot
fzfhistory() {
BUFFER="$(history -n 0 | fzf --tac --no-multi --height="$(($LINES/4))" --query="$BUFFER")"
zle reset-prompt
}
zle -N fzfhistory
bindkey "^R" fzfhistory
bindkey -M vicmd "^R" fzfhistory

View File

@ -12,11 +12,9 @@ install_if_not_exists() {
install_if_not_exists zsh-users/zsh-autosuggestions install_if_not_exists zsh-users/zsh-autosuggestions
install_if_not_exists zsh-users/zsh-syntax-highlighting install_if_not_exists zsh-users/zsh-syntax-highlighting
install_if_not_exists hlissner/zsh-autopair install_if_not_exists hlissner/zsh-autopair
install_if_not_exists unixorn/fzf-zsh-plugin
install_if_not_exists marlonrichert/zsh-autocomplete install_if_not_exists marlonrichert/zsh-autocomplete
_so "${HOME}/.config/zsh/plugins/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" _so "${HOME}/.config/zsh/plugins/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
_so "${HOME}/.config/zsh/plugins/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh" _so "${HOME}/.config/zsh/plugins/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh"
_so "${HOME}/.config/zsh/plugins/hlissner/zsh-autopair/autopair.zsh" _so "${HOME}/.config/zsh/plugins/hlissner/zsh-autopair/autopair.zsh"
_so "${HOME}/.config/zsh/plugins/unixorn/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh"
_so "${HOME}/.config/zsh/plugins/marlonrichert/zsh-autocomplete/zsh-autocomplete.plugin.zsh" _so "${HOME}/.config/zsh/plugins/marlonrichert/zsh-autocomplete/zsh-autocomplete.plugin.zsh"