Re: Stopping XCode From Inserting Tab Characters
Re: Stopping XCode From Inserting Tab Characters
- Subject: Re: Stopping XCode From Inserting Tab Characters
- From: "Molly (Dev Lists)" <email@hidden>
- Date: Thu, 25 Apr 2013 13:24:07 -0500
On 24 Apr 2013, at 05:06, Harmony Neil <email@hidden> wrote:
> Hellow,
> I know for a fact that I unchecked all the boxes in the xcode preferences to do with autoindenting etc, yet it still insists on inserting tab characters whenever I hit the enter or return key. Has anyone else had this problem or know how I might be able to fix it? I know some people find autoindenting and stuff helpful, but I find it more of a hinderence.
[ ... ]
The way that I fixed this was to modify the Key Bindings for "Insert Newline" and "Insert Newline without Extra Action."
The defaults are for Return, Enter, and what appears to be LineFeed (which I guess can be typed somehow as well?) assigned to "Insert Newline." This default arrangement makes it do all of the crazy auto-indent nonsense whenever you hit Return.
To stop it from doing that, remove Return and Enter from "Insert Newline" and instead assign them to "Insert Newline without Extra Action." This will make Return (or Enter) move you to the beginning of the next line, without inserting any tabs or indentation. (If you have tab/indent widths set to non-zero values under the Text Editing preferences, then you can still tab/indent manually; but setting these key bindings will keep Xcode from doing it on its own every time you hit Return.)
Be warned that the key binding editor is, at least for me, kind of weird and difficult to work with (the interface doesn't seem to behave the way that I expect, and it is difficult to select individual keys in a list of key bindings or to tell what is being modified); I don't know what it might be like with VoiceOver. Once you set the custom keys, though, you can save the key binding file (~/Library/Developer/Xcode/UserData/KeyBindings/Default.idekeybindings) and just copy it over to any other computers that you might use. I keep a copy of the key bindings (and my font/color settings, the other thing that I totally customize in Xcode) and just tote these over whenever I set up a new computer, to avoid having to mess about with it every time.
-- Molly
_______________________________________________
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