Preserve indent style in exitsting files

Registered by Sergey "Shnatsel" Davidoff on 2012-08-20

When opening existing files, Scratch should detect the indent style used in the document and reuse the existing indent style instead of always following the generic settings (especially since Scratch defaults to a not really obvious indent style).

This will provide an instant productivity boost when working on several projects or codebases which have different indent styles.

When there are mixed styles in a file, Scratch should fall back to default indent style which is set in preferences.

Blueprint information

Status:
Not started
Approver:
Mario Guerriero
Priority:
Medium
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Not started
Milestone target:
None

Related branches

Sprints

Whiteboard

Just adding any indent style would be great. Allman and BSD KNF styles are most popular, and most necessary, I think (they are described here - http://en.wikipedia.org/wiki/Indent_style )
Sergei

I would totally love this and it'd support code style across different projects a lot.
tom95

Bonus points for enabling nonprintable characters and showing an infobar about mixed styles, but only when we're really sure that the styles are mixed. Even more points for providing an easy indent style conversion mechanism for fixing things.
~shnatsel

(?)

Work Items

Work items:
Add support for per-file indent styles: TODO
Implement indent style detection: TODO

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.