AutoYADM commit: 2025-05-24 17:45:39

This commit is contained in:
Daniel Fichtinger 2025-05-24 17:45:39 -04:00
parent 539066a9af
commit 74bb404a6d

View file

@ -16,3 +16,33 @@ define-command git-blame %{
} }
} }
map -docstring "blame" global git b ": git-blame<ret>" map -docstring "blame" global git b ": git-blame<ret>"
map -docstring "show diff" global git d ": git show-diff<ret>"
map -docstring "hide diff" global git D ": git hide-diff<ret>"
provide-module git-diff %~
define-command -hidden git-show-diff %{
evaluate-commands %sh{
if [ $kak_buffile != $kak_bufname ] && git ls-files --error-unmatch "$kak_buffile" > /dev/null 2>&1; then
echo "git show-diff"
fi
}
}
hook global WinCreate .* %{
evaluate-commands %sh{
if [ $kak_buffile != $kak_bufname ] && git ls-files --error-unmatch "$kak_buffile" > /dev/null 2>&1; then
echo "hook window BufWritePost .* git-show-diff"
echo "hook window BufReload .* git-show-diff"
fi
}
}
hook global WinCreate .* %{
evaluate-commands %sh{
if [ $kak_buffile != $kak_bufname ] && git ls-files --error-unmatch "$kak_buffile" > /dev/null 2>&1; then
echo "git show-diff"
fi
}
}
~