This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/dotfiles/kak/hooks.kak
2021-03-11 02:20:14 -03:00

26 lines
598 B
Text

# {{@@ header() @@}}
hook global NormalIdle .* %{ try %{
palette-status
git show-diff
} }
hook global BufOpenFile .* %{
modeline-parse
}
hook global BufOpenFile .*/COMMIT_EDITMSG %{
execute-keys -draft 'ge<a-!>git log<ret>'
write
}
hook global RegisterModified '"' %{ nop %sh{
printf %s "$kak_main_reg_dquote" | wl-copy -n > /dev/null 2>&1 &
printf %s "$kak_main_reg_dquote" | xclip -i -selection clipboard > /dev/null 2>&1 &
}}
# Trim trailing whitespace
hook global BufWritePre .* %{ try %{
execute-keys -draft \%s\h+$<ret>d
} } -group remove-whitespace