AutoYADM commit: 2025-05-16 17:14:15
This commit is contained in:
parent
51ccc1e607
commit
b9cc8e936f
9 changed files with 78 additions and 171 deletions
18
.config/kak/autoload/git-mode.kak
Normal file
18
.config/kak/autoload/git-mode.kak
Normal file
|
@ -0,0 +1,18 @@
|
|||
declare-user-mode git
|
||||
map -docstring "git" global user g ": enter-user-mode git<ret>"
|
||||
map -docstring "lazygit kak cwd" global git g ": terminal lazygit<ret>"
|
||||
|
||||
define-command lazygit-buffer-dir %{
|
||||
evaluate-commands %sh{
|
||||
ROOT="$(env -C "$(dirname $kak_buffile)" git rev-parse --show-toplevel)"
|
||||
printf "terminal lazygit -p %s" "$ROOT"
|
||||
}
|
||||
}
|
||||
map -docstring "lazygit buffer directory" global git G ": lazygit-buffer-dir<ret>"
|
||||
|
||||
define-command git-blame %{
|
||||
info %sh{
|
||||
git -C $(dirname $(realpath $kak_buffile)) blame -L $kak_cursor_line,$kak_cursor_line $(realpath $kak_buffile)
|
||||
}
|
||||
}
|
||||
map -docstring "blame" global git b ": git-blame<ret>"
|
Loading…
Add table
Add a link
Reference in a new issue