From 7dd81ec516a7cf940eea50200f504a3bfc750419 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Fri, 28 Sep 2018 17:46:18 +0300 Subject: [PATCH] rc git: Support notes --- rc/base/git.kak | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rc/base/git.kak b/rc/base/git.kak index 1e5b42975..7d54fbd06 100644 --- a/rc/base/git.kak +++ b/rc/base/git.kak @@ -2,6 +2,10 @@ hook global BufCreate .*(COMMIT_EDITMSG|MERGE_MSG) %{ set-option buffer filetype git-commit } +hook global BufCreate .*/NOTES_EDITMSG %{ + set-option buffer filetype git-notes +} + hook global BufCreate .*(\.gitconfig|git/config) %{ set-option buffer filetype ini } @@ -14,8 +18,14 @@ hook -group git-commit-highlight global WinSetOption filetype=git-commit %{ add-highlighter window/git-commit-highlight/comments/ regex "\b(?:(modified)|(deleted)|(new file)|(renamed|copied)):([^\n]*)$" 1:yellow 2:red 3:green 4:blue 5:magenta } +hook -group git-commit-highlight global WinSetOption filetype=git-notes %{ + add-highlighter window/git-notes-highlight regex '^\h*#[^\n]*$' 0:cyan +} + hook -group git-commit-highlight global WinSetOption filetype=(?!git-commit).* %{ remove-highlighter window/git-commit-highlight } +hook -group git-commit-highlight global WinSetOption filetype=(?!git-notes).* %{ remove-highlighter window/git-notes-highlight } + hook global BufCreate .*git-rebase-todo %{ set-option buffer filetype git-rebase }