简体   繁体   中英

Indenting Javascript file line by line?

Is there any way in visual studio 2010 to indent javascript file line by line? I have got a big javascript file where all code is just on one line, so readability of the code is too much compromised.

Any hint? Thanks

One solution is to copy the entire file content in this site : http://jsbeautifier.org/ then press the Beatify JavaScript or HTML button, and you will get the js properly formated.

Now I suppose that Visual Studio could have a service identical to the sugested one, but I have not used it at all.

The PhpStorm that I am in love with it, has this option, to beautify the code if the code is compressed, as well allows me to define the look of the code format.

Also, as already described by @Andreas, you can use the plugin : http://visualstudiogallery.msdn.microsoft.com/41a0cc2f-eefd-4342-9fa9-3626855ca22a

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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