AutoYADM commit: 2025-06-24 15:22:31
This commit is contained in:
parent
6264b1e53c
commit
76aad0a4a4
2 changed files with 10 additions and 6 deletions
|
@ -1,15 +1,19 @@
|
|||
declare-user-mode paragraph
|
||||
declare-option -hidden str paragraph_select '<a-a>pj[p'
|
||||
declare-option -hidden str reflow_cmd %{
|
||||
fmt -u | sed -E 's/([.!?]) +/\1 /g'
|
||||
}
|
||||
|
||||
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' %{
|
||||
evaluate-commands -draft -save-regs 'a|' %{
|
||||
set-register | %opt{reflow_cmd}
|
||||
set-register a %sh{
|
||||
if [ "$#" = 0 ]; then
|
||||
printf '%s' '|fmt<ret>'
|
||||
printf '%s' '|<ret>'
|
||||
else
|
||||
printf '%s' ':<space>format-selections<ret>'
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue