Skip to content

Add menu item for formatting the source code #117

@rillig

Description

@rillig

When I edit the source code of my program, the editor doesn't get the indentation correct:

  • Type demo :-, press Enter, press Backspace 4 times, press Tab, press Enter. Now the indentation uses a mixture of tabs and spaces, which will look wrong if the next editor has a different tab width.

Type the following text:

demo :-
	L = [
        [
        karte(A)
        ],
          [
          karte(B),
            ],
          ],
    write(L), nl.
  • The second [ should be indented by 4 more spaces.
  • The third [ should not be indented by an additional 2 spaces.
  • Each closing bracket should be aligned with its corresponding opening bracket.
  • The karte(B) should be indented by an additional 4 spaces.

To fix these, either the automatic indentation should be fixed, or at least there should be a menu item with which I can re-indent the existing code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions