Xcode 7.3.1 indentation/formatting

jw2002

macrumors 6502
Original poster
Feb 23, 2008
372
39
I am using Xcode 7.3.1 and NVIDIA CUDA 8.0, and I cannot get .cu source files to automatically format as works for .c, .h, .cpp, etc in the Xcode editor. I could swear that earlier versions of Xcode (or maybe it was Bbedit?) had a place in the preferences where additional file extensions could be easily added so that they would be recognized and be indented/formatted. Does anyone know if this feature still exists? Thanks.
 

jw2002

macrumors 6502
Original poster
Feb 23, 2008
372
39
Does Ctrl + I (indent) not work for you ?
Nope, most definitely not. Essentially, a .cu file loads like any plain, unformatted text file. Everything is a black font, meaning no contextual coloring, no smart indent behavior, etc. Cutting/pasting/ctrl-i have absolutely no effect.
 

0002378

Suspended
May 28, 2017
676
631
Nope, most definitely not. Essentially, a .cu file loads like any plain, unformatted text file. Everything is a black font, meaning no contextual coloring, no smart indent behavior, etc. Cutting/pasting/ctrl-i have absolutely no effect.
Gotcha.

Have you looked here ? https://stackoverflow.com/questions/1573968/xcode-source-automatic-formatting

Looks like others have faced the same problem and have come up with some hacks to get it to work. XCode seems to suck (and I think so too) when it comes to formatting.