Skip to content

Instantly share code, notes, and snippets.

@brennie
Created September 17, 2019 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brennie/b22748960b98c7697463325b1a7e07e9 to your computer and use it in GitHub Desktop.
Save brennie/b22748960b98c7697463325b1a7e07e9 to your computer and use it in GitHub Desktop.
git fzf keybinds
# ~/.config/fish/functions/fish_user_key_bindings.fish
function __fzf_git_tags
if [ ! git rev-parse HEAD >/dev/null 2>&1 ]
return
end
git tag --sort -version:refname | \
fzf-tmux --multi --preview-window right:70% \
--preview 'git show --color=always {} | head -'$LINES
end
function fish_user_key_bindings
bind \cg\ct 'commandline --insert (__fzf_git_tags)'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment