/styleguides

Home of the Digiti style guides

Style Guides

Editor configuration

General

Line breaks:    Unix
File encoding:  UTF-8

A note on tabs

Soft tabs are made up of spaces.
Hard tabs are made up of a tab character.

There's an eternal discussion going on about which is better, e.g.:

Above all consistency is important,
so below are the standards which we've agreed upon per language.

JavaScript

Soft tabs:      NO
Spaces per tab: Personal preference

Ruby

Follow the conventions set by the Ruby and Ruby on Rails community.

Soft tabs:      YES
Spaces per tab: 2

PHP

Soft tabs:      NO
Spaces per tab: Personal preference

HTML

Soft tabs:      NO
Spaces per tab: Personal preference

CSS / SASS

Soft tabs:      NO
Spaces per tab: Personal preference

Objective-C

In general: Try to use Xcode defaults as much as possible.

Soft tabs:      YES
Spaces per tab: 4

Trailing whitespace

If possible, set your editor to automatically strip trailing whitespace.

Why is trailing whitespace a big deal?