Switch indentations from 4 spaces to 2 spaces, or 2 to 4. Rate if you like it. Issues are always welcomed.
Ctrl/Cmd + P
in Visual Studio Code, then:
ext install indent-switcher
You can use both command palette and keyboard shortcuts to switch indentations.
- Press
F1
orCtrl+Shift+P
for Command Palette - Type or find "Switch indentations from 4(2) spaces to 2(4) spaces"
- 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"
}
indentSwitcher.si4to2
Switch indentations from 4 spaces to 2 spaces.indentSwitcher.si2to4
Switch indentations from 2 spaces to 4 spaces.