I know the general answer to "How should I indent my code" is generally "do as you wish but do it the same way as everyone on your team", but in the last time I've seen many projects and platforms relying on a 2-space indentation.
I just want to make sure I get the "best bang for my buck" when indenting and make sure it's future-proof. Changing the structure in a project later on is a pretty big problem considering compatibility, etc.
Most projects now rely on 2 Spaces, 4 Spaces or Tabs.
Projects and their indentation:
- tabs
- WordPress
- jQuery
- CakePHP
- Git
- Linux Kernel (doesn't seem to be consistent)
- 4 spaces
- Django
- Symfony
- Stackoverflow
- Zend Framework
- Yahoo
- MacVim
- Memcached
- 2 spaces
- HTML5 Boilerplate
- Ruby on Rails
- Drupal
- Node.js
- Github
- Blueprint-Css
- Jekyll
- Chosen
- backbone.js
- Modernizr
- Scriptaculous
- Clojure
- Facebook (I think)
The question is where is the "community" going? 2 Spaces or 4 Spaces?
My guess is 2 Spaces, since it manifests itself in the big companies and all the standards-pushing projects are using it.
What do you think of the current and future situation? Is it wise to adapt 2 Spaces indentation?