From 75d66440275e11f7534431e48047a6cc6ab6c827 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Fri, 10 May 2024 12:16:57 -0700 Subject: [PATCH] fix fzf-git shortcuts For some reason, the fzf-git shortcuts stopped working recently (maybe something to do with a bump to readline?), but manually passing through the keystrokes seems to do the trick. --- .tmux.conf | 8 ++++++++ .zshrc | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 104dd19..cb2aa7d 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -100,6 +100,14 @@ bind -r - resize-pane -D 3 bind -r + resize-pane -U 3 bind -r = resize-pane -U 3 +## fzf-git + +# C-b will always switch to the prefix table, so use g for branches +bind -Tfzf-git C-f send-keys C-g f +bind -Tfzf-git C-h send-keys C-g h +bind -Tfzf-git C-h send-keys C-g h +bind -Troot C-g switch-client -Tfzf-git + bind C-y run-shell -b ~/.dotfiles/bin/,tmux-copy bind r source-file ~/.tmux.conf \; display 'Reloaded tmux.conf' diff --git a/.zshrc b/.zshrc index f88220b..30d4b10 100644 --- a/.zshrc +++ b/.zshrc @@ -124,12 +124,6 @@ bindkey " " magic-space if (( $+commands[fzf] )); then z4h source ${HOMEBREW_PREFIX:+$HOMEBREW_PREFIX/opt/fzf/shell/key-bindings.zsh} - # Not sure how to do key sequences w/`z4h bindkey` - bindkey '^gg' fzf-git-branches-widget - - # ^gl doesn't work in tmux, but I need reflogs more than remotes probably? - bindkey '^gr' fzf-git-lreflogs-widget - # https://github.com/junegunn/fzf/issues/164#issuecomment-581837757 z4h bindkey fzf-cd-widget รง