AutoYADM commit: 2025-05-16 16:43:07

This commit is contained in:
Daniel Fichtinger 2025-05-16 16:43:07 -04:00
parent a575f3fa40
commit 02c81dde28
2 changed files with 16 additions and 13 deletions

View file

@ -29,7 +29,7 @@ define-command format-buffer-pipe -hidden -docstring "Format the contents of the
}
}
define-command format-selections-pipe -docstring "Format the selections individually using pipe" %{
define-command format-selections-pipe -hidden -docstring "Format the selections individually using pipe" %{
evaluate-commands %sh{
if [ -z "${kak_opt_formatcmd}" ]; then
echo "fail 'The option ''formatcmd'' must be set'"

View file

@ -43,15 +43,17 @@ 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 enabled"
echo -markup "{Information}wrap normal =
}
define-command ui-wrap-disable -docstring "disable wrap" %{
defin-buffere-command ui-wrap-disable -docstring "disable wrap" %{
defin-buffere-command ui-wrap-disable -docstring "disable wrap" %{
remove-highlighter window/wrap
echo -markup "{Information}wrap disabled"
echo -markup "{Information}wrap normal =
}
define-command -override ui-wrap-toggle -docstring "toggle wrap" %{
defin-buffere-command -override ui-wrap-toggle -docstring "toggle wrap" %{
defin-buffere-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>"
@ -90,7 +92,7 @@ define-command autowrap-toggle -docstring "toggle autowrap" %{
}
}
map -docstring "toggle autowrap" global ui a ": autowrap-toggle<ret>"
# map -docstring "toggle autowrap" global ui a ": autowrap-toggle<ret>"
hook global WinCreate .* %{
ui-wrap-enable
@ -107,7 +109,8 @@ 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-s> ": w<ret>"
map -docstring "save" global normal <c-v> ": w<ret>"
map -docstring "close current buffer" global user x ": db<ret>"
map -docstring "goto previous buffer" global user m ": bp<ret>"
@ -125,7 +128,8 @@ map global normal <tab> _
# map global normal <a-X> <a-x>
# map global normal <a-x> '<a-i>p'
map -docstring "commenct line" global normal <c-v> ":comment-line<ret>"
map -docstring "comment line" global normal "#" ": comment-line<ret>"
map -docstring "comment block" global normal "<a-#>" ": comment-block<ret>"
declare-user-mode git
map -docstring "git" global user g ": enter-user-mode git<ret>"
map -docstring "lazygit kak cwd" global git g ": terminal lazygit<ret>"
@ -145,7 +149,8 @@ define-command git-blame %{
}
map -docstring "blame" global git b ": git-blame<ret>"
map -docstring "format" global user F ": format<ret>"
map -docstring "format" global normal = ": format-buffer<ret>"
map -docstring "format" global normal <a-=> ": format-selections<ret>"
# Case-insensitive Search
map -docstring 'case insensitive search' global user '/' /(?i)
@ -154,8 +159,8 @@ map -docstring 'case insensitive extend search' global user '?' ?(?i)
map -docstring 'case insensitive backward extend-search' global user '<a-?>' <a-?>(?i)
# Arrow keys for menu selections
map -docstring 'Select next menu' global prompt <down> <tab>
map -docstring 'Select previous menu' global prompt <up> <s-tab>
# 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>
@ -181,5 +186,3 @@ define-command -hidden helix-up %{
}
}
# map -docstring 'Helix scroll up' global normal <c-u> ": helix-up<ret>"