AutoYADM commit: 2025-05-24 17:45:39
This commit is contained in:
parent
539066a9af
commit
74bb404a6d
1 changed files with 30 additions and 0 deletions
|
@ -16,3 +16,33 @@ define-command git-blame %{
|
|||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue