Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switches for typable commands #5828

Open
the-mikedavis opened this issue Feb 4, 2023 · 1 comment
Open

Switches for typable commands #5828

the-mikedavis opened this issue Feb 4, 2023 · 1 comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@the-mikedavis
Copy link
Member

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:

kakoune-switches-demo

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.
@the-mikedavis the-mikedavis added the C-enhancement Category: Improvements label Feb 4, 2023
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Feb 5, 2023
@goyalyashpal
Copy link
Contributor

:config-reload and :config-open can also merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

3 participants