Re: Stopping XCode From Inserting Tab Characters
Re: Stopping XCode From Inserting Tab Characters
- Subject: Re: Stopping XCode From Inserting Tab Characters
- From: Andy Lee <email@hidden>
- Date: Wed, 24 Apr 2013 07:48:58 -0400
On Apr 24, 2013, at 7:10 AM, Alex Zavatone <email@hidden> wrote:
> I just set the intention to "Prefer indent using: spaces" and that works.
>
> If you do not want ANY auto indention, then set the indent to use 0 spaces in the "Indent width" setting.
>
> Just tested and verified this.
I could be wrong, but I was assuming the OP may want to indent, but only to do so manually. In this case I would want the tab key to insert spaces, which this would suppress.
In any case, I cannot reproduce this workaround to suppress all auto-indenting. I'm using Xcode 4.6.2.
In Preferences I have:
* Prefer indent using: Spaces
* Indent width: 0 spaces
* Syntax-aware indenting: off
I still get indenting when I hit Return; the only difference is that it doesn't add an extra level of indenting inside nested braces. In other words, if I have the cursor at the end of this line:
<TAB><TAB>{
...and I hit Return, I get:
<TAB><TAB>{
<TAB><TAB>
With "Syntax-aware indenting" on (my normal preference), I would get
<TAB><TAB>{
<TAB><TAB><TAB>
In addition, there are per-project, per-group, and per-file settings that can override the Xcode app-level preferences. You can see these in the File Inspector on the right side of the Xcode window (by default, Option-Command-1 selects/reveals it if it isn't visible already). I chose Spaces with 0 indent width in the File Inspector and it didn't help.
I think this might be a bug in the Xcode editor, since "Syntax-aware indenting" doesn't have the effect I would expect, but I don't know, maybe it "works as intended".
--Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden