Skip to content

Filed under Code

Informal Survey: Code Indentation for Embeds?

Should included templates be indented to match the page, or should every file start flush left?

I have noticed myself wrestling a bit with code indentation and specifically how it relates to content that is included from embeds or partials. I hate seeing rendered code indentation all over the place.

I have been going back and forth with this question in my head:

Is it better to indent content that is included in another template so that the rendered code of the page is consistently indented? Or is it better to start each document flush left to ease readability?

Weigh in below in the comments. I would love to hear that I am not the only one who thinks about things like this.

PS: And while we are at it, if you know how to get Sublime Text 2 to show invisibles all the time like TextMate?

Edit: Thanks to a reader who shared the fix:

add draw_white_space with the value all to preferences, settings, user