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. S开发者_开发知识库o 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?
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
I use Ctrl+E, F
. Give it a try.
精彩评论