Some typable commands might benefit from taking switches to control small parts of their behavior. A few examples of commands that could take advantage of switches:
:write and friends could take a --no-format switch which prevents auto-formatting (#4853, #4909 (comment))
:sort and :rsort could be merged into one command with reverse-sorting accomplished by :sort --reverse (#1288 (comment))
:clear-registers (#5695) could take an --all switch to clear all registers (#5695 (comment))
Kakoune has switches and it has a nice way of showing the available switches in the documentation popup:
A few items worth some discussion:
Call these "switches" or "flags"?
Support shorthand switches? For example -a would be a shorthand for --all in the :clear-registers example.
Some typable commands might benefit from taking switches to control small parts of their behavior. A few examples of commands that could take advantage of switches:
:write
and friends could take a--no-format
switch which prevents auto-formatting (#4853, #4909 (comment)):sort
and:rsort
could be merged into one command with reverse-sorting accomplished by:sort --reverse
(#1288 (comment)):clear-registers
(#5695) could take an--all
switch to clear all registers (#5695 (comment))Kakoune has switches and it has a nice way of showing the available switches in the documentation popup:
A few items worth some discussion:
-a
would be a shorthand for--all
in the:clear-registers
example.