Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>indent-switcherNew to Visual Studio Code? Get it now.
indent-switcher

indent-switcher

ephoton

|
18,709 installs
| (8) | Free
Switch indentations from 4 spaces to 2 spaces, or 2 to 4.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

indent-switcher

Switch indentations from 4 spaces to 2 spaces, or 2 to 4. Rate if you like. Issues are always welcomed.

Features

indent switcher

Install

Ctrl/Cmd + P in Visual Studio Code, then:

ext install indent-switcher

Usage

You can use both command palette and keyboard shortcuts to switch indentations.

Run with Command Palette

  • Press F1 or Ctrl+Shift+P for Command Palette
  • Type or find "Switch indentations from 4(2) spaces to 2(4) spaces"

Bind to keyboard shortcuts

  • File > Preferences > Keyboard Shortcuts
  • Append the following into keybindings.json
    {
        "key": "ctrl+shift+2",
        "command": "indentSwitcher.si2to4",
        "when": "editorFocus"
    },
    {
        "key": "ctrl+shift+4",
        "command": "indentSwitcher.si4to2",
        "when": "editorFocus"
    }

Commands

  • indentSwitcher.si4to2 Switch indentations from 4 spaces to 2 spaces.
  • indentSwitcher.si2to4 Switch indentations from 2 spaces to 4 spaces.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft