Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I turn off formatting for .js files in Xcode

Tags:

xcode

Is there a way to disable source formatting for just *.js files in Xcode? The formatter absolutely mangles my javascript files, but I don't want to lose the functionality for Objective-C file.

like image 522
rooftop Avatar asked May 04 '12 18:05

rooftop


1 Answers

What worked fairly well for me is to switch the .js files to use C syntax coloring.

In XCode 4: Editor -> Syntax Coloring -> C

It still highlights numbers and strings and comments, and it indents braces in a sane way.

like image 98
Claudiu Avatar answered Oct 26 '22 09:10

Claudiu