From f384c4ebb1a83ff52888469430edc4cd0fa0f955 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 25 Oct 2025 14:22:43 +0530 Subject: Fix editor in gitu + add relative path for daffm --- autoload/files.kak | 9 ++++++--- autoload/git.kak | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/autoload/files.kak b/autoload/files.kak index eb03a87..b928c33 100644 --- a/autoload/files.kak +++ b/autoload/files.kak @@ -1,7 +1,10 @@ -def find -docstring "find files" -menu -params 1 %{ edit -existing %arg{1} } \ - -shell-script-candidates %{ fd -t f --hidden --color=never -E .git } +def find -docstring "find files" -menu -params 1 \ + %{ edit -existing %arg{1} } \ + -shell-script-candidates %{ fd -t f --hidden --color=never -E .git } -def file-manager -params .. %{ connect terminal env "EDITOR=kcr edit" daffm -c @kak %arg{@} } +def file-manager -params .. %{ + connect terminal env "EDITOR=kcr edit" sh -c "DAFFM_PATH_RELATIVE_TO=$PWD daffm -c @kak %arg{@};" +} declare-user-mode buffer map global user b ': enter-user-mode buffer' -docstring 'Buffer mode' diff --git a/autoload/git.kak b/autoload/git.kak index 2ef96a0..e786fcb 100644 --- a/autoload/git.kak +++ b/autoload/git.kak @@ -1,5 +1,5 @@ define-command gitui -params .. %{ - connect terminal env "EDITOR=kak -c %val{session}" "VISUAL=kak -c %val{session}" gitu %arg{@} + connect terminal env "GIT_EDITOR=kak -c %val{session}" "EDITOR=kcr edit" "VISUAL=kcr edit" gitu %arg{@} } declare-user-mode git -- cgit v1.3.1