AutoYADM commit: 2025-05-11 00:22:28

This commit is contained in:
Daniel Fichtinger 2025-05-11 00:22:28 -04:00
parent 7d53867bc3
commit 8a0debc1ff

View file

@ -32,7 +32,7 @@ set-option global indentwidth 4
set-option global scrolloff 3,3 set-option global scrolloff 3,3
define-command -override tree-sitter-user-after-highlighter %{ define-command -override tree-sitter-user-after-highlighter %{
add-highlighter -override buffer/show-matching show-matching add-highlighter -override buffer/show-matching show-matching
# add-highlighter -override buffer/bracket regex [\[\]\(\)\{\}]{1} 0:rgb:737373 # add-highlighter -override buffer/bracket regex [\[\]\(\)\{\}]{1} 0:rgb:737373
} }
@ -44,24 +44,28 @@ define-command -override tree-sitter-user-after-highlighter %{
add-highlighter global/ number-lines -hlcursor -relative -separator " " add-highlighter global/ number-lines -hlcursor -relative -separator " "
add-highlighter global/ show-whitespaces -lf "" -tab "" -only-trailing add-highlighter global/ show-whitespaces -lf "" -tab "" -only-trailing
add-highlighter global/ show-matching add-highlighter global/ show-matching
add-highlighter global/wrap wrap -word -indent # add-highlighter global/wrap wrap -word -indent
declare-user-mode ui declare-user-mode ui
map -docstring "UI" global user u ": enter-user-mode ui<ret>" map -docstring "UI" global user u ": enter-user-mode ui<ret>"
define-command ui-wrap-enable -docstring "enable wrap" %{ define-command ui-wrap-enable -docstring "enable wrap" %{
add-highlighter window/wrap wrap -word -indent add-highlighter window/wrap wrap -word -indent
echo -markup "{Information}wrap enabled" echo -markup "{Information}wrap enabled"
} }
define-command ui-wrap-disable -docstring "disable wrap" %{ define-command ui-wrap-disable -docstring "disable wrap" %{
remove-highlighter window/wrap remove-highlighter window/wrap
echo -markup "{Information}wrap disabled" echo -markup "{Information}wrap disabled"
} }
hook global WinCreate %{ define-command -override ui-wrap-toggle -docstring "toggle wrap" %{
add-highlighter window/wrap wrap -word -indent try %{ ui-wrap-enable } catch %{ ui-wrap-disable }
}
map -docstring "Wrap UI" global ui w ": ui-wrap-toggle<ret>"
hook global WinCreate .* %{
ui-wrap-enable
} }
map -docstring "yank the selection into the clipboard" global user y "<a-|> wl-copy<ret>" map -docstring "yank the selection into the clipboard" global user y "<a-|> wl-copy<ret>"
@ -84,6 +88,14 @@ map -docstring "goto next buffer" global user i ": bn<ret>"
map global normal <tab> _ map global normal <tab> _
map -docstring "commenct line" global normal <c-v> ":comment-line<ret>" map -docstring "commenct line" global normal <c-v> ":comment-line<ret>"
define-command open_yazi %{
nop %sh{
rm -f /tmp/yazi-path
}
terminal yazi %val{buffile} --chooser-file=/tmp/yazi-path
edit %sh{cat /tmp/yazi-path}
}
map -docstring "open file in yazi" global user <space> ": open_yazi<ret>"
declare-user-mode git declare-user-mode git
map -docstring "git" global user g ": enter-user-mode git<ret>" map -docstring "git" global user g ": enter-user-mode git<ret>"