Closed Bug 993162 Opened 10 years ago Closed 10 years ago

Make default indent size 2 spaces

Categories

(DevTools :: Source Editor, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 31

People

(Reporter: harth, Assigned: harth)

Details

Attachments

(1 file, 1 obsolete file)

Right now the default indentation is 4 spaces. We should consider making it 2 spaces. I fetched a couple hundred random HTML/CSS/JS gists from github. Numbers:

HTML       CSS       JavaScript
====       ====      ====
57% two    56% two   45% two
19% four   21% four  32% four
16% tabs   16% tabs  18% tabs

Science.
Good science.

If there's a bias here, it's probably towards smaller projects. My guess is that larger projects often come from corporations which have coding styles, and my unscientific study says these are more likely to be 2-space based. So I'm all for this.
Attached patch 2 spaces default indent (obsolete) — Splinter Review
This'll make 2 spaces the default.
Assignee: nobody → fayearthur
Attachment #8406570 - Flags: review?(jwalker)
Attachment #8406570 - Flags: review?(jwalker) → review+
Keywords: checkin-needed
sorry had to backout since this might have caused https://tbpl.mozilla.org/php/getParsedLog.php?id=37912903&tree=Fx-Team
Whiteboard: [fixed-in-fx-team]
(In reply to Carsten Book [:Tomcat] from comment #5)
> sorry had to backout since this might have caused
> https://tbpl.mozilla.org/php/getParsedLog.php?id=37912903&tree=Fx-Team

Drats, I ran all the devtools tests. I wonder why it didn't show up then.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f2bfa7425575
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 31
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: