Your comments

I mean when you hit the tab key. Indentation using spaces always never a tab. See Xcode 4 "Text Editing" options:

Prefer indent using: Spaces / Tabs
Tab key: Indents always / Indents in leading Whitespace / Inserts tab character

These are standard editor options, for example Xcode 3, emacs, vim all have similar options.

Thanks.