Converting Tabs to Spaces in PHPeclipse

In order to maintain harmony among several developers it is important to follow some core standards. With Symfony, it is standard practice to use a two space convention. Here is how to make PHPEclipse honor this policy while still allowing you to use the tab button.

  1. I recommend this distribution. Note that you need to start this program in administrator mode if you are using Vista.
  2. Window -> Preferences
  3. PHPeclipse Web Development-> PHP
  4. Go to the Appearance tab
  5. Set “Displayed tab width” to 2
  6. Go to the Typing tab
  7. Check “Insert spaces for tab”
  8. Click Apply and OK

Thanks to Isaac Saldana, of LinRails fame for this tip.

Speak Your Mind