]> Freerunner's - dotfiles.git/commitdiff
kak: add a git user mode (wip), reorder user menu
authorAndre Ramnitz <tux.rising@gmail.com>
Wed, 4 Dec 2024 22:01:51 +0000 (23:01 +0100)
committerAndre Ramnitz <tux.rising@gmail.com>
Wed, 4 Dec 2024 22:01:51 +0000 (23:01 +0100)
dot-config/kak/kakrc

index 4d3d9c7d4e848218f81c9f8617706b1bbda27678..391b8ca9f3ed3ed1c08ef7916b623a91866ceeb3 100644 (file)
@@ -298,6 +298,7 @@ map global normal -docstring 'comment line'                              '#'  ':
 map global normal -docstring 'comment block'                           <a-#>  ': comment-block<ret>'
 map global normal -docstring 'Next buffer '                            <c-n>  ': buffer-next<ret>'
 map global normal -docstring 'Previous buffer'                         <c-p>  ': buffer-previous<ret>'
+map global normal -docstring 'Delete buffer'                           <c-q>  ': delete-buffer<ret>'
 map global normal -docstring 'add 1 int'                                 '^'  ': inc %val{count} +<ret>'
 map global normal -docstring 'substract 1 int'                         <a-^>  ': inc %val{count} -<ret>'
 map global normal -docstring 'surround'                                    0  ': surround<ret>'
@@ -305,13 +306,17 @@ map global normal -docstring 'surround'                                    0  ':
 # default user mode
 # ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 map global user -docstring 'buffer mode'                                 b  ': enter-user-mode buffermode<ret>'
+map global user -docstring 'git mode'                                    g  ': enter-user-mode gitmode<ret>'
 map global user -docstring 'selection mode'                              s  ': enter-user-mode selmode<ret>'
+map global user -docstring 'LSP mode'                                    l  ': enter-user-mode lsp<ret>' 
+map global user -docstring 'Table mode'                                  t  ': enter-user-mode table<ret>' 
+map global user -docstring 'Table mode (locked)'                         T  ': enter-user-mode -lock table<ret>' 
+map global user -docstring ':::::::::::::::::::::::::::::::: ::'         :  ': <esc>'
 map global user -docstring 'Edit kakrc'                                  E  ': e ~/.config/kak/kakrc<ret>'
 map global user -docstring 'highlight hex color without leading #'       p  ': addhl global/hex_color_code2 ref hex_color_code2<ret>'
 map global user -docstring 'unhighlight hex color without leading #'  <s-p> ': rmhl global/hex_color_code2<ret>'
 map global user -docstring 'highlight hex color with leading #'         '#' ': addhl global/hex_color_code ref hex_color_code<ret>'
 map global user -docstring 'unhighlight hex color with leading #'     <a-#> ': rmhl global/hex_color_code<ret>'
-map global user -docstring ':::::::::::::::::::::::::::::::: ::'         :  ': <esc>'
 map global user -docstring 'Scratch buffer'                              S  ': buffer *scratch*<ret>'
 map global user -docstring 'Debug buffer'                                D  ': buffer *debug*<ret>'
 map global user -docstring 'expand selection'                            e  ': expand<ret>'
@@ -321,9 +326,6 @@ map global user -docstring 'relative line numbers enable'                r  ': a
 map global user -docstring 'relative line numbers disable'               R  ': rmhl window/nl<ret>'
 map global user -docstring 'help command mode enable'                    h  ': set -add global autoinfo normal<ret>'
 map global user -docstring 'help command mode disable'                   H  ': set -remove global autoinfo normal<ret>'
-map global user -docstring 'LSP mode'                                    l  ': enter-user-mode lsp<ret>' 
-map global user -docstring 'Table mode'                                  t  ': enter-user-mode table<ret>' 
-map global user -docstring 'Table mode (locked)'                         T  ': enter-user-mode -lock table<ret>' 
 
 # kak-lsp keys
 # ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -361,6 +363,19 @@ map global selmode -docstring 'change surround'                          c  ':ch
 map global selmode -docstring 'delete surround'                          d  ':delete-surround<ret>'
 map global selmode -docstring 'select tag'                               t  ':select-surrounding-tag<ret>'
 
+# git user mode
+# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+declare-user-mode gitmode
+map global gitmode -docstring 'Blame jump'                               b  ':git blame-jump<ret>'
+map global gitmode -docstring 'Blame annotations'                        B  ':git blame<ret>'
+map global gitmode -docstring 'Diff'                                     d  ':git diff<ret>'
+map global gitmode -docstring 'Edit'                                     e  ':git edit<ret>'
+map global gitmode -docstring 'Log'                                      l  ':git log --oneline<ret>'
+map global gitmode -docstring 'Log (full)'                               L  ':git log<ret>'
+map global gitmode -docstring 'Next hunk'                                n  ':git next-hunk<ret>'
+map global gitmode -docstring 'Previous hunk'                            p  ':git prev-hunk<ret>'
+map global gitmode -docstring 'Status'                                   s  ':git status<ret>'
+
 # terminal config (via foot.kak)
 # ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 set-option global foot_normal_cmd 'foot'