AutoYADM commit: 2025-05-16 16:59:01

This commit is contained in:
Daniel Fichtinger 2025-05-16 16:59:01 -04:00
parent 02c81dde28
commit 51ccc1e607
2 changed files with 33 additions and 33 deletions

View file

@ -18,6 +18,7 @@ define-command trampoline -docstring "open a tutorial" %{
}
}
# This gets overridden by editorconfig but we set sane default anyways
set-option global tabstop 4
set-option global indentwidth 4
@ -25,14 +26,12 @@ set-option global scrolloff 3,3
define-command -override tree-sitter-user-after-highlighter %{
add-highlighter -override buffer/show-matching show-matching
# add-highlighter -override buffer/bracket regex [\[\]\(\)\{\}]{1} 0:rgb:737373
}
# define-command -override tree-sitter-use-after-highlighter %{
# add-highlighter -override window/bracket regex [\[\]\(\)\{\}]{1} 0:red
# }
# add-highlighter global/bracket regex [\[\]\(\)\{\}]{1} 0:red
# make brackets gray a-la Ashen
add-highlighter global/bracket regex [\[\]\(\)\{\}]{1} 0:rgb:737373
# special highlighting for escaped goodies in regex
add-highlighter global/regex-escaped regex \\[\[\]\(\)\{\}fnrtv0\\dwshDWSH] 0:rgb:e5e5e5
add-highlighter global/ number-lines -hlcursor -relative -separator " "
add-highlighter global/ show-whitespaces -lf "" -tab "" -only-trailing
add-highlighter global/ show-matching
@ -43,17 +42,15 @@ map -docstring "UI" global user u ": enter-user-mode ui<ret>"
define-command ui-wrap-enable -docstring "enable wrap" %{
add-highlighter window/wrap wrap -word -indent
echo -markup "{Information}wrap normal =
echo -markup "{Information}wrap enabled"
}
defin-buffere-command ui-wrap-disable -docstring "disable wrap" %{
defin-buffere-command ui-wrap-disable -docstring "disable wrap" %{
define-command ui-wrap-disable -docstring "disable wrap" %{
remove-highlighter window/wrap
echo -markup "{Information}wrap normal =
echo -markup "{Information}wrap disabled"
}
defin-buffere-command -override ui-wrap-toggle -docstring "toggle wrap" %{
defin-buffere-command -override ui-wrap-toggle -docstring "toggle wrap" %{
define-command -override ui-wrap-toggle -docstring "toggle wrap" %{
try %{ ui-wrap-enable } catch %{ ui-wrap-disable }
}
map -docstring "toggle soft wrap" global ui w ": ui-wrap-toggle<ret>"
@ -109,7 +106,10 @@ map -docstring "quit" global user q ": q<ret>"
map -docstring "quit" global normal <c-q> ": q<ret>"
map -docstring "quit" global user Q ": q!<ret>"
map -docstring "quit" global normal <c-Q> ": q!<ret>"
map -docstring "save" global normal <c-v> ": w<ret>"
map -docstring "save" global normal <c-v> ": write<ret>"
map -docstring "save" global normal <a-v> ": write!<ret>"
# map -docstring "save" global normal <a-v> ": write-all<ret>"
# map -docstring "save" global normal <a-V> ": write-all!<ret>"
map -docstring "close current buffer" global user x ": db<ret>"
@ -161,28 +161,15 @@ map -docstring 'case insensitive backward extend-search' global user '<a-?>' <a-
# Arrow keys for menu selections
# map -docstring 'Select next menu' global prompt <down> <tab>
# map -docstring 'Select previous menu' global prompt <up> <s-tab>
hook global InsertCompletionShow .* %{
map window insert <down> <c-n>
map window insert <up> <c-p>
hook -once window InsertCompletionHide .* %{
unmap window insert <down>
unmap window insert <up>
}
}
# hook global InsertCompletionShow .* %{
# map window insert <down> <c-n>
# map window insert <up> <c-p>
# hook -once window InsertCompletionHide .* %{
# unmap window insert <down>
# unmap window insert <up>
# }
# }
map -docstring 'Select to file end' global user N "Gj<a-L>L"
map -docstring 'Extend to file end' global user n "gj<a-l>l"
declare-option -hidden int helix_up_line
define-command -hidden helix-up %{
set-option window helix_up_line %val{cursor_line}
execute-keys <c-u>
evaluate-commands %sh{
if [ "$kak_cursor_line" = "$kak_opt_helix_up_line" ]; then
echo "execute-keys gg"
else
echo "nop"
fi
}
}