ZDoom, XCode and the indent setting

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
Kotti
Posts: 86
Joined: Tue Dec 27, 2016 4:08 am

ZDoom, XCode and the indent setting

Post by Kotti »

Every time I have to let CMake regenerate the project it will reset XCode's indent to use spaces instead of tabs, so I have to manually reset it.
Is there any way to tell it to set it to tabs, as is the default for the GZDoom source? Unfortunately the CMake documentation is no help here, as usual - I sometimes wonder how such a complex setup could even be done with these poor docs.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: ZDoom, XCode and the indent setting

Post by _mental_ »

AFAIK you can do this only by altering generated projects manually or via some script.
Alternatively, you can change Xcode default setting to use tabs instead of spaces in Preferences -> Editing -> Indentation.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZDoom, XCode and the indent setting

Post by Graf Zahl »

Well, this is Apple - and if Apple decides on a certain way, everything else is wrong by default and not properly supported. There's several such things in macOS that could drive me up walls.
I've yet to see a single native XCode project that doesn't suffer from bad code formatting - because XCode makes it very easy to do so.
User avatar
printz
Posts: 2648
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: ZDoom, XCode and the indent setting

Post by printz »

Regarding Xcode, you're totally wrong. You can use Xcode to set project and even file specific indentation rules. You can even make it display Chocolate/vanilla Doom's inane indentation correctly, and still only put spaces when indenting new code.

Meanwhile the Visual Studio indenting settings are global or worse, linked to the Microsoft user account.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZDoom, XCode and the indent setting

Post by Graf Zahl »

This may be more a CMake issue, but nevertheless, I've yet to find a way to set the default for newly created content to something that's not 4 spaces.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: ZDoom, XCode and the indent setting

Post by _mental_ »

Check the second image from this topic.
Post Reply

Return to “General”