Xcode 7.3.1 indentation/formatting

Discussion in 'Mac Programming' started by jw2002, Jun 29, 2017.

  1. jw2002 macrumors 6502

    Joined:
    Feb 23, 2008
    #1
    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.
     
  2. maculateConception macrumors regular

    maculateConception

    Joined:
    May 28, 2017
    Location:
    Die Bundesstaat Kalifornien
  3. jw2002 thread starter macrumors 6502

    Joined:
    Feb 23, 2008
    #3
    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.
     
  4. maculateConception macrumors regular

    maculateConception

    Joined:
    May 28, 2017
    Location:
    Die Bundesstaat Kalifornien
    #4
    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.
     

Share This Page