JavaScript Formatting in Visual Studio 2008 sp1

by ely February 08, 2010 10:27

The formatting of JavaScript in VS 2008 has finally drove me nuts.  Particularly, when pressing enter after a statement, the IDE will decrease the indent of the line above.  Why it does this makes no sense to me, but there is a way to get around it.

In VS2008, go to Tools>Options>Text Editor>JScript>Formatting.  Uncheck “Format completed line on Enter”.  This will keep the IDE from changing the formatting when adding new lines of code to a function/code block in JavaScript.

Tags: ,

Code

blog comments powered by Disqus

Powered by BlogEngine.NET 2.0.0.36
Theme by Mads Kristensen | Modified by Mooglegiant

About me

@ElyLucas

I am a Denver based software developer, focusing mainly on web technologies in the Microsoft stack.  I dig Asp.Net, MVC, jQuery, C#, JavaScript, and HTML5.  I am starting to dabble in mobile technologies like iOS, Android, and wp7, and have particular interests in mobile web.  I am a Microsoft MVP for Asp.Net/IIS.  I live in Westminster, CO with my wife, son, and dog.  During the day, I sling code for @aspenware creating awesome software.


Month List

Page List

Site hosted by: