kakoune: add idle_timeout and more git keys and git-update on idle

This commit is contained in:
2026-05-23 18:25:04 +02:00
parent d815cadb7b
commit 076860b0d2

View File

@@ -2,6 +2,7 @@
set-option global startup_info_version 20260412
set-option global ui_options terminal_assistant=none
set-option global idle_timeout 300
hook global WinCreate .* %{
add-highlighter window/number-lines number-lines -relative -hlcursor
@@ -33,11 +34,14 @@ map global -docstring 'Git' user 'g' ': enter-user-mode git-mode<ret>'
map global -docstring 'Blame' git-mode 'b' ': git blame<ret>'
map global -docstring 'Blame' git-mode 'B' ': git blame-jump<ret>'
map global -docstring 'Diff file' git-mode 'd' ': git diff %val{buffile}<ret>'
map global -docstring 'Diff' git-mode 'D' ': git diff<ret>'
map global -docstring 'Grep' git-mode 'g' ': git grep '
map global -docstring 'Log' git-mode 'l' ': git log -- %val{buffile}<ret>'
map global -docstring 'Log' git-mode 'L' ': git log<ret>'
map global -docstring 'Show diff' git-mode 's' ': git show-diff<ret>'
map global -docstring 'Hide diff' git-mode 'h' ': git hide-diff<ret>'
map global -docstring 'Show branch' git-mode 'c' ': git show-branch<ret>'
map global -docstring 'Status' git-mode 't' ': git status<ret>'
map global -docstring 'Show diff' git-mode 's' ': git-show-diff<ret>'
map global -docstring 'Hide diff' git-mode 'h' ': git-hide-diff<ret>'
map global -docstring 'Next hunk' git-mode 'n' ': git next-hunk<ret>'
map global -docstring 'Prev hunk' git-mode 'p' ': git prev-hunk<ret>'
@@ -102,6 +106,16 @@ define-command git-log-show-current-commit %{
git show %val{selection}
}
define-command -override git-show-diff %{
hook buffer -group git-show-diff NormalIdle .* %{ git update-diff }
git show-diff
}
define-command -override git-hide-diff %{
remove-hooks buffer git-show-diff
git hide-diff
}
set-face global JumpLabel 'rgb:faf8f5,rgb:af8842+F'
# CHANGE STATUS BAR COLOR IN INSERT MODE