TabWidth in HTML VSCode
So I figured out how to adjust my tab size in prettier in VS code but it only works for JavaScript. I am having a hard time telling apart where each div ends and I would really appreciate a larger tab width in html and css. OR if each div was color coded a different color, that would be great too. I tried to figure out how to make prettier apply to html and css with chatgpt but it had me create a config file and upload it and I tried but I can’t figure out how to upload it or name it correctly.
This is so complicated for something that seems so simple, it’s making me consider switching to a different IDE. I would super appreciate suggestions on how to fix this in VSCode or other IDEs.
9 Replies
Nevermind, my boyfriend helped me. He had to change the settings.json file in VSCode and edit it.
no, you don't have to change directly in the file
on the status bar, you have the indentation settings
if you want to change the default, it's easy to find too
Omg it was there the whole time! Okay but mine says spaces:2 and when I click it shows this and when I change it to 4 or 5 it doesn’t seem to change? And it’s only changing one file at a time.
Honestly it’s not a huge deal bc even with 2 spaces it looks so much better than yesterday where it was like one character or maybe less 😅
Nvm I think it did change now that I closed it and opened it again. This is great if i want to change one file. Thank you!!
you shouldn't just change it
you should convert from spaces to tabs, and then change the size
if you simply change the tab style, it won't touch the rest of the file
which may be useful for when you need to keep git clean
Done thank you!
you're welcome
by the way, yes, these settings are for a single file
but they are so useful