From 4271658423b06eb4089de80082831fbc596f8b10 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Wed, 21 May 2025 23:37:14 -0400 Subject: [PATCH] AutoYADM commit: 2025-05-21 23:37:14 --- .config/kak/autoload/grep.kak | 9 +++++++++ .config/kak/autoload/title.kak | 9 ++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.config/kak/autoload/grep.kak b/.config/kak/autoload/grep.kak index 0e9b6abd..a1d23277 100644 --- a/.config/kak/autoload/grep.kak +++ b/.config/kak/autoload/grep.kak @@ -1,3 +1,12 @@ # https://strongly-typed-thoughts.net/blog/kakoune-philosophy set-option global grepcmd 'rg --column --smart-case --sort path' +define-command -hidden grep-jump-current-line %{ + evaluate-commands -save-regs clp %{ + execute-keys -draft 'ghT:"py2lT:"ly2lT:"cy' + edit -existing %reg{p} %reg{l} %reg{c} + } +} +hook global WinSetOption filetype=grep %{ + map window normal ': grep-jump-current-line' +} diff --git a/.config/kak/autoload/title.kak b/.config/kak/autoload/title.kak index f9cf204f..2f6797e3 100644 --- a/.config/kak/autoload/title.kak +++ b/.config/kak/autoload/title.kak @@ -27,7 +27,7 @@ declare-option -docstring %{ } str bar_inactive_fmt '%s %s' define-command -hidden bar-buflist %{ evaluate-commands %sh{ - starttime=$(date +%s%3N) + # starttime=$(date +%s.%N) list='' while read buf; do if [ "$buf" = '*debug*' ]; then @@ -46,9 +46,9 @@ define-command -hidden bar-buflist %{ list="$list $cur" done <<<$(printf '%s\n' "$kak_buflist" | perl -nE 'say for /(\*[^*]+\*|\S+)/g') title="$list - $kak_client@[$kak_session]" - endtime=$(date +%s%3N) - printf "set-option -add global ui_options %%{terminal_title=%s}" "$title" - printf "info 'time elapsed: %s ms'" "$((end - start))" + # endtime=$(date +%s.%N) + printf "set-option -add global ui_options %%{terminal_title=%s}\n" "$title" + # printf "info 'time elapsed: %s ms'" "$(echo "$endtime - $starttime" | bc -l)" } } @@ -56,6 +56,5 @@ hook global WinDisplay .* bar-buflist hook global FocusIn .* bar-buflist hook global FocusOut .* bar-buflist hook global WinCreate .* bar-buflist -hook global NormalIdle .* bar-buflist hook global BufWritePost .* bar-buflist hook global ModeChange .* bar-buflist