AutoYADM commit: 2025-05-21 23:37:14
This commit is contained in:
parent
ba437c354a
commit
4271658423
2 changed files with 13 additions and 5 deletions
|
@ -1,3 +1,12 @@
|
||||||
# https://strongly-typed-thoughts.net/blog/kakoune-philosophy
|
# https://strongly-typed-thoughts.net/blog/kakoune-philosophy
|
||||||
set-option global grepcmd 'rg --column --smart-case --sort path'
|
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 <ret> ': grep-jump-current-line<ret>'
|
||||||
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ declare-option -docstring %{
|
||||||
} str bar_inactive_fmt '%s %s'
|
} str bar_inactive_fmt '%s %s'
|
||||||
define-command -hidden bar-buflist %{
|
define-command -hidden bar-buflist %{
|
||||||
evaluate-commands %sh{
|
evaluate-commands %sh{
|
||||||
starttime=$(date +%s%3N)
|
# starttime=$(date +%s.%N)
|
||||||
list=''
|
list=''
|
||||||
while read buf; do
|
while read buf; do
|
||||||
if [ "$buf" = '*debug*' ]; then
|
if [ "$buf" = '*debug*' ]; then
|
||||||
|
@ -46,9 +46,9 @@ define-command -hidden bar-buflist %{
|
||||||
list="$list $cur"
|
list="$list $cur"
|
||||||
done <<<$(printf '%s\n' "$kak_buflist" | perl -nE 'say for /(\*[^*]+\*|\S+)/g')
|
done <<<$(printf '%s\n' "$kak_buflist" | perl -nE 'say for /(\*[^*]+\*|\S+)/g')
|
||||||
title="$list - $kak_client@[$kak_session]"
|
title="$list - $kak_client@[$kak_session]"
|
||||||
endtime=$(date +%s%3N)
|
# endtime=$(date +%s.%N)
|
||||||
printf "set-option -add global ui_options %%{terminal_title=%s}" "$title"
|
printf "set-option -add global ui_options %%{terminal_title=%s}\n" "$title"
|
||||||
printf "info 'time elapsed: %s ms'" "$((end - start))"
|
# 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 FocusIn .* bar-buflist
|
||||||
hook global FocusOut .* bar-buflist
|
hook global FocusOut .* bar-buflist
|
||||||
hook global WinCreate .* bar-buflist
|
hook global WinCreate .* bar-buflist
|
||||||
hook global NormalIdle .* bar-buflist
|
|
||||||
hook global BufWritePost .* bar-buflist
|
hook global BufWritePost .* bar-buflist
|
||||||
hook global ModeChange .* bar-buflist
|
hook global ModeChange .* bar-buflist
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue