aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.config/zsh/shortcuts
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-10-12 14:40:28 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-10-12 14:40:28 +0300
commit9b9b48ccd7e4035b17e253a78760da9491db04b2 (patch)
treec415cb68f61b42743871edc32bb0e41e3d789547 /dotfiles/.config/zsh/shortcuts
parent88597d8e81c522c8b9d146ca96debfe91643a36b (diff)
downloadswayrice-9b9b48ccd7e4035b17e253a78760da9491db04b2.tar.gz
swayrice-9b9b48ccd7e4035b17e253a78760da9491db04b2.zip
zsh fzf shortcuts
Use fzf's own widgets for zsh keybindings.
Diffstat (limited to 'dotfiles/.config/zsh/shortcuts')
-rw-r--r--dotfiles/.config/zsh/shortcuts10
1 files 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'