Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Size of indentation
This is very random question, but on the video in VSCode he has indentation set as "Spaces:4". I have it set the same and in my document there are 4 spaces and in the video it looks rather like 2 spaces which is more readable and saves some space. How can I have a same look as in the video?
Jason AndersTreehouse Moderator 145,855 Points
Oksana is correct. The only way to do this is to change the tab size from 4 to 2.
This is overwritten when a file is opened or code is copy/pasted into the editor by the
Detect Indentation flag in the settings. You can see in This Video that Andrew Drags-n-Drops code into the editor that has only 2 spaces indents, so 2 spaces is what will be used, regardless of what his editor is set to.
But simply, Oksana is right. If you want to only use 2 spaces, you are going to have to change the 4 to a 2 in your local editor. There is no "optically" option.
Keep coding! :)