32

I know I'm not the first one that would like to have #region and brace matching support for Javascript. That's why I don't want to install one by one and see which one behaves better and which functionality it supports.

I would like to ask other fellow developers to provide feature comparison for these Visual Studio 2010 Javascript extensions:

And any issues you might've had with them. JSEnhancements seems to have the most downloads, but that still doesn't give me any ideas of its features compared to others.

It's great that Microsoft provides some sort of integrated extension propagation and management, but there's an overwhelming amount of them and it's really hard to choose the right ones.

Other Javascript VS tools

There are other tools as well that some of you may be using. If you find any of those particularly useful, please provide some information and I'll add it here to this list. It may help us lots.

  • Javascript Parser - parses Javascript file and displays a tree structure of the code (closures/functions/...)
Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
Robert Koritnik
  • 103,639
  • 52
  • 277
  • 404
  • Thank you so much for the link to JSEnhancements! It's very useful extension! – Genius Nov 24 '10 at 14:16
  • 3
    This is not an answer to the exact question you asked so I will make it a comment; I have been searching for a tool that supports javascript refactoring and have just heard that ReSharper will be extending support for javascript in version 6. They recently put it in their early access program (http://blogs.jetbrains.com/dotnet/2010/12/resharper-6-eap-is-open-details-on-javascript-support/). And as mentioned in http://stackoverflow.com/questions/2432256/how-far-did-devexpress-get-with-javascript-refactoring DevExpress CodeRush is improving support also. – Matthew Nichols Jan 02 '11 at 14:32
  • bit late to the party, but in reply to Matthew above, JetBrains also have an IDE specifically for front-end development called WebStorm. This features JS refactoring (as well as CSS and HTML) and is very cool. Worth checking out if you're interested in that kind of thing – WickyNilliams Apr 27 '11 at 11:19
  • I am using the ReSharper 6.0 JS Features, but compared to the C# Features it is still some way to go. – Horst Walter Aug 13 '11 at 17:07

5 Answers5

18

Since nobody answered my question let me give you some information about JSEnhancements that I installed in the end and am very very pleased with:

  • it supports #region in javascripts (// #region Name) as well as in CSS files (/* #region Name */) which is really great and they don't interfere with anything since they're part of comments
  • it highlights matching braces even though this is not always working, you have to position yourself correctly. Maybe it interferes with Power Tools that I also use...

Sometimes you have to close+reopen the file for regions to start working. Sometimes writing them down doesn't recognise them. Newer versions work as expected It obviously works fine when you open the file and it parses it.

Anyway. It's stable, works and I'm very pleased with this extension. You won't miss with its installation.

Robert Koritnik
  • 103,639
  • 52
  • 277
  • 404
5

Well there is one more tool for javascript "Javascript parser" which will parse your files and make a map on it. It is good but for me working with jquery it didn't help much.

Among the rest of the tools you mentioned, I was working too with JSenhancements for some time but I have switched to JScript Editor Extensions which I can tell seems more promising (highlight of current word, para comments etc).

It hasn't crashed since.

George Mavritsakis
  • 6,829
  • 2
  • 35
  • 42
  • Javascript parser does code trees which may quite nicely bee done using nested regions as well. I guess it's a nice tool, but as you say it doesn't work. regions on the other hand do. :) but thanks for the info as well. I'll add the tool to the list. – Robert Koritnik Jan 22 '11 at 17:37
3

Try JScript Editor Extensions by Microsoft for VS2010

nabeelfarid
  • 4,156
  • 5
  • 42
  • 60
2

JScript Editor Extensions is much better than JSEnhancements. It will highlight matching braces, cold-folding the blocks, current word highlighting.

Although it does not support #region name,

but you can use javascript curly brackets to enclose your code and place a comment above to know what you are making collapsible.

//My region
{
  //lines of code
  //lines of code
  //lines of code
}

these will collapse and don't appear to affect anything else. javascript just treats them as simple compound statement.

Further, I would also recommend Web Standards Update as it also helped me with intellisense and validation.

Aamir Jamal
  • 855
  • 9
  • 15
1

Javascript Explorer - Though this will not region'ize your code, it sounds to be handy!

abhilashca
  • 249
  • 1
  • 8
  • 21
  • Why is this a VS extension because it doesn't integrate with it in any developer-process way. It could just be a program where you open a file and see the same things. It doesn't work with opened documents in any way. You have to manually do everything. This tool would be better off outside of VS. And frankly... Javascript Parser does a better job doing seemingly the same things... – Robert Koritnik Mar 15 '12 at 18:45
  • **Oh I get it!** this can *almost* be regarded as SPAM because you're advertising something that has almost no relation to the original question... – Robert Koritnik Mar 15 '12 at 18:49