Whitespaces ranther than tab key.

It will be better using whitespaces(2 or 4) rather than tab key in the yii source code and yii generated code. The tab key is notorious in diferent IDEs and text editors. It’s a mess when we add whitespace indented code whithin the yii generated code.

I agree.

This is a discussion that’s going on for ages :). I think PEAR coding standard defined spaces somewhen but still some people prefer tabs. I guess it’ll be hard to convince the other side. But if you set your IDE to display 4 spaces as tabs it should at least improve display.

If you want to find more arguments for/against tabs/spaces, just do a google search on "tabs vs spaces".

ZF Indentation

B.2.2. Indentation

Indentation should consist of 4 spaces. Tabs are not allowed.

Tab is the semantic way to indent code. It’s up to each and every developer how source indentation will appear in their preferred text editor. Nearly all of them support settings to change tabs to spaces and vice-versa.

i agree with pestaa, it should be up to the user and his choise of IDE, if your IDe only uses spaces and not tabs then i think that’s totally up^to you to use that IDE

yes it is a user decision, also think about -> what is easier? pressing backspace 4 times or 1 time???

and because a tab is just ONE character the size of the file is less than if you use 4 spaces (4 characters)!!!

Since the generated code is indented by tab key, so we need to replace the tab key with whitespace manually or by IDE if we prefer whitespace. It would be better if we can config this preference(Tab key or whitespace) in configuration file or switch it by command line option.

you can easily bash script that …

felinx, you can easily edit the templates that are used to generate sample code.