22

Coming from a background using Visual Studio and Notepad++ I'm used to the indent guides which help to visually enhance sections of code where the curly braces are used,

Xcode (No indent guides)

xcode

Visual Studio (Nice tidy indent guides)

vs2010

As you can see from the images above sometimes there are sections of code where multiple levels of curly braces are open and it gets messy without any indent guides. Are there any options or plugins that will allow xcode to display the indent guides in between sections of code? Like the VS2010 sample?

4 Answers 4

9

In Xcode 10, if you press Command and hover over the structure it will show what is desired. It is not permanent but it helps.

Vertical line to show structure star end

Sign up to request clarification or add additional context in comments.

2 Comments

It's Option now.
In Xcode 15 the vertical line was removed and only the start and end lines of the code block is highlighted.
7

I've been searching the same but the most similar solution on Xcode 11 is shows invisibles

Example

1 Comment

For me the Invisibles are not helping at all.Not even similar to Indentation guides.
5

Xcode doesn't have this feature (not that I'm aware of) , but it has a (kinda) similar one. If you look closely in a method with a few loops or if structures, each structure gets a black tint on the left side of the editing area (right next to the line numbers).

You can collapse or expand the functions as needed. enter image description here

1 Comment

Thank you. This will have to make do.
0

If you activate "Invisibles" and also switch "Indent Using" to Tabs you will get a useful view:

enter image description here

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.