• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Stopping XCode From Inserting Tab Characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Stopping XCode From Inserting Tab Characters
      • From: Andy Lee <email@hidden>
References: 
 >Stopping XCode From Inserting Tab Characters (From: Harmony Neil <email@hidden>)
 >Re: Stopping XCode From Inserting Tab Characters (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: Stopping XCode From Inserting Tab Characters
  • Next by Date: Re: Stopping XCode From Inserting Tab Characters
  • Previous by thread: Re: Stopping XCode From Inserting Tab Characters
  • Next by thread: Re: Stopping XCode From Inserting Tab Characters
  • Index(es):
    • Date
    • Thread