How to disable formatting of .js files in Xcode

Is there a way to disable source formatting only for * .js files in Xcode? Formatting absolutely changes javascript files, but I don't want to lose functionality for an Objective-C file.

+5
source share
3 answers

You can turn off crazy javascript indentation automatically by going to

Settings → Text Editing → Indents

and uncheck the "Indentions that support syntax" box.

This disables automatic indentation for all languages, not just .js files. If you do a lot of javascript or don't mind to press the tab key indent, it might be worth it.

+3
source

, .js .

XCode 4: → → C

- , , .

+5

I have Xcode 4.6.1 and I was able to save the syntax coloring by going to

Xcode → Preferences ... → Text Editing → Indents

and just clear the Auto-indent check box for: ";" (semicolon).

I was able to save another indentation with the syntax and included, and got good results.

+1
source

All Articles