AutoYADM commit: 2025-06-17 20:47:57
This commit is contained in:
parent
1f952af0ed
commit
80c399ee03
16 changed files with 476 additions and 131 deletions
|
@ -1,8 +1,27 @@
|
|||
declare-user-mode paragraph
|
||||
declare-option -hidden str paragraph_select '<a-a>pj[p'
|
||||
|
||||
map global normal <a-ret> '<a-a>pj[p'
|
||||
define-command format-paragraph %{
|
||||
execute-keys -draft <a-a>p_x:<space>format-selections<ret>
|
||||
}
|
||||
|
||||
define-command -override -params 0..1 reflow-paragraph %{
|
||||
evaluate-commands -draft -save-regs 'a' %{
|
||||
set-register a %sh{
|
||||
if [ "$#" = 0 ]; then
|
||||
printf '%s' '|fmt<ret>'
|
||||
else
|
||||
printf '%s' ':<space>format-selections<ret>'
|
||||
fi
|
||||
}
|
||||
echo -debug %reg{a}
|
||||
execute-keys -draft '<a-a>p_x:exec <c-r>a<ret>'
|
||||
}
|
||||
}
|
||||
|
||||
map global normal <a-ret> ': reflow-paragraph<ret>'
|
||||
map global normal <ret> '<a-a>pj[p<a-;>'
|
||||
map global normal <s-ret> ': reflow-paragraph formatcmd<ret>'
|
||||
map -docstring 'paragraph mode' global user <ret> "%opt{paragraph_select}: enter-user-mode -lock paragraph<ret>"
|
||||
map global paragraph I '>' -docstring 'move right'
|
||||
map global paragraph M '<' -docstring 'move left'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue