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

Auto-indenter (Edit -> Lines -> Indent (Tab)) adds one too many indents at closing curly bracket #2325

Open
Sibsen1 opened this issue Jan 11, 2025 · 1 comment

Comments

@Sibsen1
Copy link

Sibsen1 commented Jan 11, 2025

Expected Behavior

Marking the whole script (or just line 3) and hitting tab should give the following auto-formatted indents:

{
    var x = 1
}

Actual Behavior

Marking the whole script and hitting tab yields one extra indent before the last curly bracket on line 3:

{
    var x = 1
    }

Same with only var:

{
    var
    }

Note this issue does not persist at the following variations:

With semicolon:

{
    var;
}

Without var:

{
    x = 1
}

Specifications

  • Chromium: 131.0.6778.265 (Official Build) (64-bit)
  • TM: 5.3.3
  • OS: Windows 11 Home 23H2
@derjanb
Copy link
Member

derjanb commented Jan 16, 2025

You may want to try my extension that allows to edit the userscripts of Tampermonkey at vscode.dev (which is basically a VSCode online editor).

I know this does not fix Tampermonkey's internal editor, but it might help.
To test it you have to install Tampermonkey Editors.

A click at "Tampermonkey Editors"' icon will take you to vscode.dev and a "folder" with all installed Tampermonkey scripts should be automatically opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants