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

Provide a "smarter" document formatter #14

Open
dklilley opened this issue Aug 15, 2023 · 1 comment
Open

Provide a "smarter" document formatter #14

dklilley opened this issue Aug 15, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@dklilley
Copy link
Member

Is your feature request related to a problem? Please describe.
Current document formatting only modifies preceding and trailing whitespace on lines. It would be great if it could handle more advanced formatting, like adjusting whitespace within a line (e.g. a = 4+ 5 formatted to a = 4 + 5).

@dklilley dklilley added the enhancement New feature or request label Aug 15, 2023
@gregdvd
Copy link

gregdvd commented Apr 20, 2024

Related to this, is there a reason why the formatter adds spaces in empty lines? Trailing spaces are usually discouraged (at least in my experience), and raise warnings with, e.g., git diff --check.

In this example I've replaced the trailing spaces added by the formatter with the · sign, to make them visible.

j = 0;
l = 0;
for i = 0:10
    j = j + 1;
····
    l = l + 2;
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants