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! While you're at it, check out some resources Treehouse students have shared here.
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
Richard Nash
24,862 PointsWhy do code lines not keep the same level of indentation when they move to a second line?
Why do lines of text in workspace not stay at the same indent level on the 2nd and 3rd lines of code that they exist on? This is super frustrating. It would also be great to have vertical lines representing levels of indent in workspaces as well, as it is easy to get lost really quickly without these visual aids. Sublime Text seems to handle these things quite well.
Thank you,
RIchard Nash Los Angeles, CA
3 Answers
Chris Shaw
26,676 PointsHi Richard,
I just checked and Workspaces do respect the indent spacing you have set which by default is 2 spaces, if you have white space before where you're tabbing from then that will change the indent size and cause and inconsistent result.
It would also be great to have vertical lines representing levels of indent in workspaces as well, as it is easy to get lost really quickly without these visual aids.
I've never used guides as I find them to be intrusive and distracting but it would be a good toggle option to have along side active line highlighting.
Richard Nash
24,862 PointsI'm not referring to the pre-set indent spacing at the bottom right corner of the screen, but when a line is so long that it becomes two of more lines, and the second and subsequent lines do not have a number anymore because they are part of the top line of that group of lines... i really do not know how to explain it well, i apologize. For example. Let's say I start a line, let's call it line 125, and the contents of that line is a <p> paragraph with 1,000 words... that line (125) is going to physically take up more than one line in the text edit window, and every line after the first line of that line is going to not maintain the indent of the first line of that line. I wish i could upload a pic, i think that would tell the story so quickly.
Richard Nash
24,862 PointsHi Chris Upjohn, notice in the above image that line 121 actually takes up three lines and the second two lines do not indent themselves with the first line. That is what i am talking about. I want the second two lines of line 121 to keep the indent of the first line of line 121.
