Re: Xcode editor - code jumps 13 tab spaces
Re: Xcode editor - code jumps 13 tab spaces
- Subject: Re: Xcode editor - code jumps 13 tab spaces
- From: Ian Piper <email@hidden>
- Date: Sat, 27 Feb 2010 17:04:32 +0000
On 27 Feb 2010, at 14:23, Ian Piper wrote: On 27 Feb 2010, at 12:38, Ken Thomases wrote: On Feb 27, 2010, at 6:21 AM, Ian Piper wrote: I'm encountering a really annoying problem in the Xcode editor. When entering code, if I hit Return to start a new method, or if I type a ":" symbol in a line of code, the cursor (or the whole line of code if I have started typing something) jumps 13 tabs across the screen. This happens on two of my Macs, both running Xcode 3.2.1. It may sound like a trivial problem but it means that long lines of text just disappear off the side of the screen, resulting in a lot of scrolling. If I select the text and move it back, it jumps in again the next time I type a ":".
Can anyone advise me on how to stop this irritating pheonomenon?
You can turn off Syntax-aware indenting in Xcode's preferences, under Indentation. However, I suspect the reason is that Xcode believes there is an unbalanced opening brace or bracket at a deep level of indentation. In other words, it believes it's indenting to the proper level for the syntax of the code as written. For example, does it do this at the top of the file? I suspect it only starts partway down the file. You can use the code level indicator ("code folding ribbon") in the window gutter so find where it loses track (or where your code really is unbalanced).
Since Ken sorted this problem for me it has occurred to me that actually this is worth remembering as a nice cue to you that something is amiss in your code's syntax. If you notice that the cursor jumps in more than you expect it to when you hit return, or when you type one of the other characters, the chances are that somewhere in the code above you have not properly closed braces or brackets.
Ian. -- |
_______________________________________________
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