Indent Guide Lines In Xcode

It would be extremely helpful to have indent guides like what Visual Studio has in Xcode as discussed here.

Would you agree?

Post not yet marked as solved Up vote post of ganjugrg Down vote post of ganjugrg
4.1k views

Replies

Yes, I would agree that would be a nice option, even though you can hover over an opening bracket with option pressed and see the whole structure section.


Did you file a report for enhancement ?

We need this! Curly bracket pyramid of doom in swift is bad
yes this would be so nice!!! I can't believe that such a simple and widely used feature is not possible!

SwiftUI without Bracket Guidelines is a nightmare. SwiftUI is logically simple but visually the dirtiest.

I writing code to earn Money I have Android und Android Studio with more and user friendly Tools

While I agree that indent guides would be a very good thing, it doesn't matter so much to me because I've just discovered the joys of refactoring SwiftUI code, resulting in easy to follow code such as

	var body: some View {
		GeometryReader { geometry in
			VStack {
				displayTopRowControls()
				displayColumnHeaders()
				displayPluginGrid()
			}
		}
	}

	func displayTopRowControls() -> some View {
		return HStack {
			displayPluginTypePicker()
			displayUpdateButton()
			displayFilter()
			Spacer()
		}
	}
	
	func displayPluginTypePicker()-> some View {
		return Picker("  Options", selection: $selectedOption) {
			Text("VST").tag("VST")
			Text("VST3").tag("VST3")
			Text("CLAP").tag("CLAP")
			Text("DEMO").tag("DEMO")
		}
		.pickerStyle(MenuPickerStyle())
		.frame(minWidth: 150, idealWidth: 150, maxWidth: 150, maxHeight: 23, alignment: .center)
		.padding(.top, 6)
		.padding(.bottom, 0)
	}

The key to it was my discovery of the return HStack/VStack/Whatever construction!

I've been doing Swift for about 4 days now, and this has really been a eureka moment for me, because without it, as @djn125wer2 says, SwiftUI code gets very dirty very quickly, particularly if, like me you are coding for a Mac screen rather than the more manageable dimensions of an iPhone or iPad.

Basic features like that, which is implemented literally in any random IDE, makes me fell so frustrated sometimes with Xcode customization capabilities.

It is really sad that Apple doesn't put the efforts to make Xcode an world class IDE like Android Studio.