0

I've written an html file using a tab size of 4 set in both User and Workspace parts of the settings options in VSCode.

I'd like to use a tab size of 2. After changing the size from 4 to 2 the html file stays at 4 spacing and hasn't updated the size off all tabs to 2. A tab spacing of 2 is used when I create a new html but I would like to update my current file so that all tabs are spaced with 2 not 4. How can I do this?

btew2102
  • 73
  • 6
  • There is a plugin to do this: https://marketplace.visualstudio.com/items?itemName=Compulim.indent4to2 – Merijndk Jul 23 '20 at 16:27
  • Thanks @Merijndk this works but the default tab is still set to 4 spaces after I press tab despite the settings showing it at 2. i.e. I have to run the plugin every time I tab. I'm looking to change the document to 2 spaces per tab instead of 4 permanently. – btew2102 Jul 23 '20 at 17:05
  • Your answer may be in this SO https://stackoverflow.com/questions/34174207/how-to-change-indentation-in-visual-studio-code/45671704 – ap.dev Jul 23 '20 at 19:02
  • @ap.dev Thanks, solved. – btew2102 Jul 23 '20 at 20:57

0 Answers0