0

I have started working with someone else on VS Code and they are using a tab size of 4 while I use 2. I have changed mine to 4 as well now but my already written code has a tab size of 2 but I would like to change all of it to 4 without manually go through all the code.

Is there an easy way to do this?

  • 1
    are you inserting tabs or spaces? Select 2 spaces, **Select All Occurrences**, type 4 spaces, or use a document formatter – rioV8 Sep 26 '21 at 10:07
  • 1
    Does this help https://stackoverflow.com/questions/34174207/how-to-change-indentation-in-visual-studio-code?rq=1 – Servesh Chaturvedi Sep 26 '21 at 10:16
  • Check this out: https://stackoverflow.com/questions/34174207/how-to-change-indentation-in-visual-studio-code You can change the tab indent size in vs code and format your project again. – Amir Meimari Sep 26 '21 at 10:18

2 Answers2

1

You can select all the code and press tab manually of what tab size you want.

  • 2
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 26 '21 at 10:21
1

The solution for your problem is very simple just

Press Ctrl+F in vs-code and

Then in the find section type \t then

In the replace section type \t\t

Yay! your work is done

Hope it helped :)

Sunil
  • 31
  • 5