Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>customize-indentation-rulesNew to Visual Studio Code? Get it now.
customize-indentation-rules

customize-indentation-rules

garaemon

|
419 installs
| (0) | Free
Customize indentation rules
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

customize-indentation-rules README

This extension can overwrite indentation rules of programming languages.

Extension Settings

Write indentation rules for increasing and decreasing indent for each programming language you want to change in settings.json.

    "customizeIndentationRules.rules": [
        {
            "language": "cpp",
            "increaseIndentationPattern": "^.*\\{[^}\"\\']*$|^.*\\([^\\)\"\\']*$|^\\s*(public|private|protected):\\s*$|^\\s*@(public|private|protected)\\s*$|^\\s*\\{\\}$",
            "decreaseIndentationPattern": "^\\s*(\\s*/[*].*[*]/\\s*)*\\}|^\\s*(\\s*/[*].*[*]/\\s*)*\\)|^\\s*(public|private|protected):\\s*$|^\\s*@(public|private|protected)\\s*$"
        },
        {
            "language": "c",
            "increaseIndentationPattern": "^.*\\{[^}\"\\']*$|^.*\\([^\\)\"\\']*$|^\\s*(public|private|protected):\\s*$|^\\s*@(public|private|protected)\\s*$|^\\s*\\{\\}$",
            "decreaseIndentationPattern": "^\\s*(\\s*/[*].*[*]/\\s*)*\\}|^\\s*(\\s*/[*].*[*]/\\s*)*\\)|^\\s*(public|private|protected):\\s*$|^\\s*@(public|private|protected)\\s*$"
        },
    ]
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft