spaces vs. tabs vs. spaces


I am currently in a quite small team, so we do not have real coding guidelines. I prefer to use soft tabs with the length of 4 spaces. One of my team members prefers just two spaces. Now the source code is mixed up and ugly. Is there any way, maybe a setting I did not find yet, to align the two-spaces- and four-spaces-tabbed files? In settings->Code Style->PHP I could not really find the appropriate setting.

Kind Regards,

1 comment
Comment actions Permalink

Hi Karlheinz,

If someone prefers 4 spaces and another person 2 spaces, then I can only suggest using tabs instead of actual spaces: in such way you both will be able to see the same code in "preferred way".

  • If you want to reformat such file(s) to some single standard (e.g. 4 spaces) then try "Code | Auto-Indent Lines" or maybe even "Code | Reformat Code..."
  • If you want to convert spaces into tabs (or other way arround) then "Edit | Convert Indents | To Tabs/To Spaces"

Please sign in to leave a comment.