GNU coreutils: fmt - simple optimal text formatter

declare-user-mode fmt

map global user 'F' ': enter-user-mode<space>fmt<ret>' -docstring "fmt - simple optimal text formatter"

map global fmt 'a' '| fmt --split-only --uniform-spacing --width=102<ret>'                -docstring "fmt - '\h'  whitespace selection"
map global fmt 'b' '| fmt --prefix="#" --split-only --uniform-spacing --width=102<ret>'   -docstring "fmt - '#'   prefixed selection"
map global fmt 'c' '| fmt --prefix="*" --split-only --uniform-spacing --width=102<ret>'   -docstring "fmt - '*'   prefixed selection"
map global fmt 'd' '| fmt --prefix="/*" --split-only --uniform-spacing --width=102<ret>'  -docstring "fmt - '/*'  prefixed selection"
map global fmt 'e' '| fmt --prefix="/**" --split-only --uniform-spacing --width=102<ret>' -docstring "fmt - '/**' prefixed selection"
map global fmt 'f' '| fmt --prefix="//" --split-only --uniform-spacing --width=102<ret>'  -docstring "fmt - '//'  prefixed selection"

You’ll make it work the way you wan’t:

And support a local:

Go get some. Bye :wave:.

1 Like