If you want to use tabs instead of spaces
Try this:
- Go to
File➤Preferences➤Settingsor just press Ctrl + , - In the Search settings bar on top insert
editor.insertSpaces - You will see something like this: Editor: Insert Spaces and it will be probably checked. Just uncheck it as show in image below
- Reload Visual Studio Code (Press
F1➤ typereload window➤ press Enter)
If it doesn't worked try this:
It's probably because of installed plugin JS-CSS-HTML Formatter
(You can check it by going to File ➤ Preferences ➤ Extensions or just pressing Ctrl + Shift + X, in the Enabled list you will find JS-CSS-HTML Formatter)
If so you can modify this plugin:
Press F1 ➤ type
Formatter config➤ press Enter (it will open the fileformatter.json)Modify the file like this:
4| "indent_size": 1, 5| "indent_char": "\t" ——| 24| "indent_size": 1, 25| "indentCharacter": "\t", 26| "indent_char": "\t", ——| 34| "indent_size": 1, 35| "indent_char": "\t", 36| "indent_character": "\t"Save it (Go to
Press F1 ➤ typeFile➤Saveor just press Ctrl + S)Formatter config➤ press Enter (it will open the fileformatter.json)Reload Visual Studio Code (Press F1 ➤ type
Modify the file like this:reload window➤ press Enter)
4| "indent_size": 1, 5| "indent_char": "\t" ——| 24| "indent_size": 1, 25| "indentCharacter": "\t", 26| "indent_char": "\t", ——| 34| "indent_size": 1, 35| "indent_char": "\t", 36| "indent_character": "\t" - Save it (Go to
File➤Saveor just press Ctrl + S) - Reload Visual Studio Code (Press F1 ➤ type
reload window➤ press Enter)
