From 662295b04b96580bcf1c78df9d13dca89adaa454 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Mon, 20 Oct 2025 17:45:21 +0530 Subject: Add git selection line blame --- autoload/orgmode/orgmode.kak | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'autoload/orgmode') diff --git a/autoload/orgmode/orgmode.kak b/autoload/orgmode/orgmode.kak index 15e3ba3..370ea14 100644 --- a/autoload/orgmode/orgmode.kak +++ b/autoload/orgmode/orgmode.kak @@ -20,22 +20,21 @@ define-command orgmode-toggle %{ define-command orgmode-jump-link %{ # TODO: support multiple links in single line - evaluate-commands -draft %{ try %{ + evaluate-commands %{ try %{ execute-keys ',xs\[\[([^\n\]]+)\]' - set-register a %reg{1} + evaluate-commands %sh{ + [ -z "$kak_reg_1" ] && exit 0 + case "$kak_reg_1" in + https://*|http://*) xdg-open "$kak_reg_1" >/dev/null 2>&1 ;; + /*|~/*) echo "edit %{$kak_reg_1}" ;; + *) + current_path="${kak_buffile:-"$kak_bufname"}" + path="$(realpath -s "$(dirname "$kak_buffile")/$kak_reg_1")" + echo "edit %{$path}" + ;; + esac + } } } - evaluate-commands %sh{ - [ -z "$kak_reg_a" ] && exit 0 - case "$kak_reg_a" in - https://*|http://*) xdg-open "$kak_reg_a" >/dev/null 2>&1 ;; - /*|~/*) echo "edit %{$kak_reg_a}" ;; - *) - current_path="${kak_buffile:-"$kak_bufname"}" - path="$(realpath -s "$(dirname "$kak_buffile")/$kak_reg_a")" - echo "edit %{$path}" - ;; - esac - } } define-command orgmode-toggle-checkbox %{ -- cgit v1.3.1