diff options
-rw-r--r-- | fzf/.config/zsh/.zshrc.d/90-fzf.zsh | 17 | ||||
-rw-r--r-- | zsh/.config/zsh/.zshrc | 13 |
2 files changed, 20 insertions, 10 deletions
diff --git a/fzf/.config/zsh/.zshrc.d/90-fzf.zsh b/fzf/.config/zsh/.zshrc.d/90-fzf.zsh index 50c5ec2..58e0454 100644 --- a/fzf/.config/zsh/.zshrc.d/90-fzf.zsh +++ b/fzf/.config/zsh/.zshrc.d/90-fzf.zsh @@ -1,18 +1,17 @@ #!/bin/zsh -# vim: ft=sh - -_fzf_compgen_path() { - fd --hidden --follow --exclude ".git" . "$1" -} - -_fzf_compgen_dir() { - fd --type d --hidden --follow --exclude ".git" . "$1" -} if [ -r "/usr/share/fzf/completion.zsh" ]; then source /usr/share/fzf/completion.zsh fi +if [ -r "/usr/share/fzf/key-bindings.zsh" ]; then + source /usr/share/fzf/key-bindings.zsh + for keymap in emacs vicmd viins; do + bindkey -rM $keymap '\ec' + bindkey -rM $keymap '^T' + done +fi + if [ -n "$BASE16_THEME" ] && [ -n "$BASE16_SHELL_ENABLE_VARS" ]; then export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS --color=bg+:#$BASE16_COLOR_01_HEX,bg:#$BASE16_COLOR_00_HEX,spinner:#$BASE16_COLOR_0C_HEX,hl:#$BASE16_COLOR_0D_HEX diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index dcf318b..d6ddf41 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -33,8 +33,18 @@ hash -d rfc=/usr/share/doc/rfc/txt hash -d auto=$XDG_CONFIG_HOME/autostart hash -d app=$XDG_DATA_HOME/applications +function push-input-hold { + buf="$BUFFER" + cur="$CURSOR" + zle push-input + BUFFER="$buf" + CURSOR="$cur" +} +zle -N push-input-hold + # See: https://wiki.archlinux.org/title/Zsh#Key_bindings -bindkey '^[q' push-line +bindkey '^[q' push-input +bindkey '^[Q' push-input-hold bindkey '^[[Z' reverse-menu-complete bindkey '^[[1~' beginning-of-line bindkey '^[[4~' end-of-line @@ -45,6 +55,7 @@ bindkey '^[t' transpose-words bindkey '^ ' forward-word bindkey -M vicmd '^[q' push-line +bindkey -M vicmd '^[Q' push-input-hold bindkey -M vicmd '^[[Z' reverse-menu-complete bindkey -M vicmd '^[[1~' beginning-of-line bindkey -M vicmd '^[[4~' end-of-line |