如何设置Xcode以进行正确的JavaScript格式化? [英] How to setup Xcode for proper javascript formatting?

查看:88
本文介绍了如何设置Xcode以进行正确的JavaScript格式化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我键入以下内容时, Xcode3(和更新;)没有正确格式化Javascript:

  doSomething(某处,函数) (错误,结果){

它插入了一个巨大的缩进。我试图改变Xcode格式规则,但没有运气。不管怎样,它会打破缩进。



是否有正确的方法将Xcode用于javascript开发?

解决方案

快速解决方案是选择视图 - >语法着色 - >简单着色。
如果您可以在没有花哨语法高亮的情况下编辑Javascript,这非常有用。



这种方式只有数字和字符串是彩色的,并且缩进不会那么烦人。


Xcode3 (and newer ;) doesn't properly format Javascript when I type something like:

doSomething(somewhere, function(err, result) { 

It inserts a huge indentation. I tried to change Xcode formatting rules but no luck. One way or another it breaks indentations.

Is there a proper way to use Xcode for javascript development?

解决方案

A quick solution is to choose View -> Syntax Coloring -> Simple Coloring. If you are okay to edit Javascript without fancy syntax highlight, this is pretty useful.

This way only the numbers and strings are colored, and the indentation stops being so annoying.

这篇关于如何设置Xcode以进行正确的JavaScript格式化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆