Preserve indent style in exitsting files
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
- Started by
- Completed by
Related branches
Related bugs
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://
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