Reputation: 4916
When I save files in VSCode, they are automatically formatted. Tab characters are converted to four spaces. But I prefer tabs. How can I force VSCode to use tab characters instead of four spaces?
These are my settings.
{
"files.insertFinalNewline": true,
"terminal.integrated.shellArgs.windows": [
"-ExecutionPolicy",
"Bypass"
],
"files.trimFinalNewlines": false,
"window.zoomLevel": 0,
"explorer.confirmDelete": false,
"workbench.startupEditor": "newUntitledFile",
"typescript.updateImportsOnFileMove.enabled": "always",
"typescript.format.semicolons": "remove",
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"editor.tabSize": 4,
"editor.insertSpaces": false
}
What setting am I missing to force VSCode to not replace tab characters with 4 spaces?
Upvotes: 34
Views: 30938
Reputation: 109005
In the settings editor, search for "indent" to find "Editor: insert spaces".
(This can be overridden on a language basis as well.)
Upvotes: 42