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

Improve formatting of :set command output #666

Merged
merged 7 commits into from
Jul 19, 2023

Conversation

citizenmatt
Copy link
Member

This PR fixes a few minor formatting issues with the output of the :set command:

  • It removes the trailing spaces added to the end of the line for column padding
  • It sorts option names before formatting, so the no prefix for boolean options isn't included
  • Options with values (scrolloff=5) are formatted with a 2 char indent to line up with the boolean options
  • Long options are not wrapped by the formatter, but expected to be wrapped by the output pane. The formatter doesn't have the actual width of the output pane, only the character width of the editor, which doesn't include line numbers and gutter width. The output pane can enable soft wraps to provide better wrapping
  • Output in the same order as Vim, filling each column in turn, rather than filling multiple columns horizontally
  • Support :set! to output options in a single column

Sorts on option name, not including "no" prefix for toggle options
Hard wraps require figuring out the width of the panel, and all we have is the width of the associated editor, which excludes gutter, etc. Easier to let the UI toolkit handle it
This means that the last column might not be full, rather than the last row. Same as Vim.
@AlexPl292
Copy link
Member

This looks good for me. Thank you for your changes!

@AlexPl292 AlexPl292 merged commit 6bd1782 into JetBrains:master Jul 19, 2023
@citizenmatt citizenmatt deleted the feature/set-output-format branch July 19, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants