admin管理员组文章数量:1332872
I am looking for a formatting/indetation tool for sublime text 2, which on ctrl+s
turns the following code
if(a==2){b=a+2;}
to something like
if(a == 2) {
b = a + 2;
}
I can't find anything useful. Please help.
I am looking for a formatting/indetation tool for sublime text 2, which on ctrl+s
turns the following code
if(a==2){b=a+2;}
to something like
if(a == 2) {
b = a + 2;
}
I can't find anything useful. Please help.
Share Improve this question asked May 17, 2016 at 18:25 Nitin AggarwalNitin Aggarwal 2151 gold badge3 silver badges10 bronze badges 04 Answers
Reset to default 7You can use JsFormat
JsFormat is a JavaScript formatting plugin. Behind the scenes, it uses the mand line formatter from jsbeautifier to format full or portions of JavaScript and JSON files.
Try Beautify or HTML/CSS/JS beautify
CoolFormat offers various bracket, indentation, whitespace, & formatting styles for the following langauges:
C
,C++
,C#
,CSS
,HTML
,Java
,JavaScript
,JSON
,Objective-C
,PHP
,SQL
,XML
I have worked around an easy solution for my code indentation/formatting problem. I am using an online formatting tool JSBeautifier. I just copy my whole code and paste it in jsbeautifier and after it formats my code I copy my formatted code and paste it back to my js file.
本文标签: javascriptFormatting tool for sublime textStack Overflow
版权声明:本文标题:javascript - Formatting tool for sublime text - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742308316a2450362.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论