From 9b9b48ccd7e4035b17e253a78760da9491db04b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Tue, 12 Oct 2021 14:40:28 +0300 Subject: zsh fzf shortcuts Use fzf's own widgets for zsh keybindings. --- dotfiles/.config/zsh/shortcuts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dotfiles/.config/zsh/shortcuts b/dotfiles/.config/zsh/shortcuts index 199faee..70041dc 100644 --- a/dotfiles/.config/zsh/shortcuts +++ b/dotfiles/.config/zsh/shortcuts @@ -29,9 +29,13 @@ alias spw="setsid $TERMINAL >/dev/null 2>&1 &" alias testinet="ping -c2 example.com" # Fuzzy finder -alias fzd='cd "$(find . -type d -path "*/\.*" -prune -o -not -name ".*" -type d | fzf || echo ".")"' -alias fzv='nvim "$(find . -type d -path "*/\.*" -prune -o -not -name ".*" -type f | fzf)"' alias fzo='op "$(find . -type d -path "*/\.*" -prune -o -not -name ".*" -type f | fzf)"' +source /usr/share/fzf/completion.zsh +source /usr/share/fzf/key-bindings.zsh +bindkey -r '^T' +bindkey -r '\ec' +bindkey '^F' fzf-file-widget +bindkey '^A' fzf-cd-widget # Function for changing working dir after exiting lf lfcd () { @@ -48,7 +52,7 @@ lfcd () { fi } -# some keybindings +# Some keybindings bindkey -s '^o' 'lfcd\n' bindkey -s '^t' 'spw\n' -- cgit v1.2.3