From 883734268edf4d7e47d00d29105bf288d16d844e Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Tue, 5 Mar 2024 18:37:03 +0100 Subject: [PATCH] shell,vim: add git blame alias --- files/shell/.shellrc.alias | 3 +++ files/vim/.vimrc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/files/shell/.shellrc.alias b/files/shell/.shellrc.alias index f0773d4..ac65d5e 100644 --- a/files/shell/.shellrc.alias +++ b/files/shell/.shellrc.alias @@ -10,6 +10,9 @@ alias cp='cp -i' alias mv='mv -i' alias rm='rm -i' +### Git fun +alias gbl='git show $(git ls-files | fzf --reverse --bind "enter:become(git blame {1} | fzf --ansi --reverse | cut -f 1 -d \" \")")' + ### Abbreviations alias dcr='dc down && dc up -d && dc logs -f' alias dh1='du . -h -d1' diff --git a/files/vim/.vimrc b/files/vim/.vimrc index 5c11b0f..5f15b0d 100644 --- a/files/vim/.vimrc +++ b/files/vim/.vimrc @@ -17,7 +17,6 @@ call plug#begin() " essentials Plug 'jiangmiao/auto-pairs' " pair completion -Plug 'mhinz/vim-signify' " show lines changed in git(1) Plug 'tpope/vim-commentary' " DWIM comments " file search @@ -103,6 +102,7 @@ let &t_EI = "\[2 q" map f :GFiles map F :Files +map b :Buffers command! -bang -nargs=* GGrep \ call fzf#vim#grep(