kakoune: add idle_timeout and more git keys and git-update on idle
This commit is contained in:
@@ -33,11 +33,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,16 +105,28 @@ 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
|
||||
|
||||
hook global ModeChange push:.*:insert %{
|
||||
set-face window StatusLine 'default,rgb:04785d'
|
||||
set-option window idle_timeout 500
|
||||
}
|
||||
|
||||
hook global ModeChange pop:insert:.* %{
|
||||
unset-face window StatusLine
|
||||
unset-option window idle_timeout
|
||||
}
|
||||
|
||||
# ODIN
|
||||
|
||||
Reference in New Issue
Block a user