简体   繁体   English

Xcode缩进html / javascript文件

[英]Xcode indenting an html/javascript file

So I am editing a HTML file with a bunch of javascript in it that I am using in my iOS project. 所以我正在编辑一个HTML文件,其中包含一些我在iOS项目中使用的javascript。 Xcode is doing a terrible job of letting me indent things. Xcode在让我缩进的过程中做得非常糟糕。 Is there any way to mess with the indentation settings at all? 有什么方法可以搞乱缩进设置吗? Things are just getting really hard to read. 事情变得非常难以阅读。

在此输入图像描述

There's a preference in Xcode for this. 在Xcode中有一个偏好。

缩进首选项

This will likely not help the text currently in the files you're editing (since the indentations / spaces are already there and to change them, you need to do some manual editing), but modifying these preferences will help you going forward. 这可能对您正在编辑的文件中的当前文本没有帮助(因为缩进/空格已经存在并且要更改它们,您需要进行一些手动编辑),但修改这些首选项将有助于您继续前进。

Also, here's a related question with answers that may help you further . 此外, 这是一个相关的问题,答案可能会帮助你进一步

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM