Saeed Neamati
Saeed Neamati

Reputation: 35842

Visual Studio 2010 can't format complex JavaScript documents

I have a custom JavaScript file and it's getting large. The problem is, though the whole JavaScript is well-written and there is no syntactical error (even colons are there), Visual Studio 2010 can't format the document. I extracted each part separately to a separate file, and there, formatting Ctrl + K + D or Ctrl + E, D works just fine. But when they come together formatting stops working. I saw other posts, and they had no such problem. So I posted my question here.I know that Visual Studio is still at it's infancy for JavaScript support. But do you have the same problem? Is there a way to make JavaScript experience better in VS2010?

Upvotes: 2

Views: 4469

Answers (2)

Daniel Corbett
Daniel Corbett

Reputation: 255

There are quite a few things you can do to improve your javascript experience:

1 - Install the WebStandards update: http://www.hanselman.com/blog/AnnouncingTheWebStandardsUpdateHTML5SupportForTheVisualStudio2010Editor.aspx

2 - Perhaps one or more of the Javascripts extensions will help you. Go to the Tools Menu, select Extensions, and then search for Javascript. (#1 is actually the first install that comes up).

But there are a number of other extensions that claim to improve javascript parsing. There's also a JSLint as well.

I hope these help!

  • Daniel

Upvotes: 2

asma
asma

Reputation: 2825

I use Ctrl+E, F. Give it a try.

Upvotes: 2

Related Questions