Visual Studio Javascript extensions feature comparison - javascript

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:
JSEnhancements
Visual Studio 2010 JavaScript Outlining
JScript Editor 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/...)

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.

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.

Try JScript Editor Extensions by Microsoft for VS2010

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.

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

Related

Correctly configuring Eclipse for non-web JavaScript development

Recently I've needed to write a small utility for Acrobat in its JavaScript.
Because the editor in Acrobat is pretty limited, I've installed the latest release of Eclipse IDE for JavaScript and Web Developers (Neon). It should already include the latest JSDT 2.0.
However, I've been surprised, that Eclipse's JavaScript editor does not correctly parse even simple common JavaScript patterns, like namespaces, modules, single global variable, etc. Also code folding is missing, except the very first function.
I do not expect to debug Acrobat's JavaScript code in Eclipse, but I wanted to have a smart JavaScript editor and also projects, where I could gather a few non-JavaScript resources. Some automation possibilities would be also nice, of course.
I've played with Eclipse preferences a lot and I've also searched on Internet, but I was not able to find anything really helpful.
Have I missed something in Eclipse configuration or is it really wasting of time and I should use something else?
For small projects a free IDE would be preferable, but also reasonably priced commercial products would be acceptable.
A configuration solution in Eclipse would be the most welcome, of course.
Thanks a lot for your help.
The support for newer Javascript Syntax is very bad in Eclipse (Bug).
You can use Tern.js it has a good ES5 and ES6 support.
But for Javascript development there are a lot of much better editors like Webstorm, VisualStudio, Sublime out there. You'll like more!
From my experience with Acrobat JavaScript, and the Acroforms technology (which you use when you work in PDF), there are not that many advantages you get from an IDE.
In fact, for my work (which IS extensive), a good text editor, with quote and parentheses balancing, maybe even auto-indent, and basic JavaScript code coloring is pretty much sufficient. I personally do write the scripts in BBEdit, and then copy/paste them into the Acrobat JavaScript editor window.
Keep in mind that JavaScripts in Acrobat/PDF are generally quite short, because they do not have to deal with DOM overhead, and because the field event sequence is quite structured (and it is really important to understand this sequence… more important than fancy JavaScript constructs). You also have to be aware that the JavaScript core implementation in Acrobat is relatively old (recently, they did upgrade it, but if your forms/applications are for the general public, you can't rely on them having the very newest version of Acrobat/Reader).

editor for javascript, xsl, xhtml and css, other than aptana or xcode?

It is a good thing if this is opensource, much better if it is multi-OS.
I used to use XCode for mac, and I find it quite interesting as an editor. But I don't like how it handles the "projects" (I hate when suddently you find new folders and files in your code folder).
Needing to work with windows, I've tried aptana. It seems that when building a project, it just reads the content without writting anything. It is much cleaner for me. But I find it heavily loaded with characteristics that I do not need, and I really miss the find/replace features of XCode, where all the matches are automatically marked on the document, and the "folding" versatility of XCode also vs the aptana possibilities.
Then I've though that maybe I was missing some key program out there. Any suggestions?
(thanks)
For Windows, I'd recommend Notepad++. Also works on Linux with Wine. Very minimal, yet powerful. Free, and open source. See my own review at http://blogger.ziesemer.com/2007/10/notepad.html. Excerpt:
I've been doing quite a bit of JavaScript coding lately, and the
desire for a good code editor quickly becomes apparent.
The two main features I was looking for were capable syntax
highlighting and code folding. (While other languages such as Java and
C++ are commonly supported, many other editors seem to lack good
support for JavaScript.)
Notepad++ does both of these nicely, does them by default, and does
them well. Additionally, it is free and open source, with a GNU GPL
license.
Other useful features included are:
Search and replace using Regular Expressions.
"Find in Files". Handy for searching for a string or pattern across multiple files and directories.
Block-select mode / rectangular block selection. Select and manipulate columns of characters, without selecting the entire row(s).
Bracket matching, auto indentation, and compiler integration.
Yours is a better question than the one I'm about to link to, but the answers should be about the same:
HTML +CSS +Javascript Editor

Quick Test javascript snippet for browser compatibility

Just as we have http://www.sliver.com/dotnet/SnippetCompiler/ (link inactive on 2021-04-24) to test a C# code quickly, I can also do the same for javascript in chrome debugger tools and Firebug (firefox).
I would be more interested in a tool or some online tool which can run a small piece of javascript and tell if it properly runs in prominent browsers and the result.
UPDATE:
I'm a developer and not tester. I don't want to install all browsers on my PC. I like chrome and I can debug/test (for syntax/result) almost every javascript quickly in chrome by just clicking Ctrl+Shift+J and pasting my javascript in its console. But that will just test if it works in chrome. I'm not interested in creating a library right now. Google and Stackoverflow helps me get the greatest and latest javascript for a specific task very quickly.
I found one way. But it is not that quick and still would like to know better answer. May be some kind of tool which can do this.
One Way:-
Write your javascript enclosed in try-catch block on JsBin and create its public link. Now check your link with BrowserShots.
Write considerable amount of html (conditionally) using javascript to be able to see the difference on Images given by BrowserShots.
To propose another option 10 years down the line: I would suggest using JSHint for this.
The first page as you navigate to their site allows you to simply paste a JS snippet and get information regarding everything from potentially confusing syntax to "minimum ES version" warnings.
Furthermore, you can also install JSHint to your project and have a command to either run manually or slot into your existing build chain to do the same thing locally with custom rules.
I've also found this tool: JS Compatibility Checker, which is based on Can I use.
Could be helpful, but won't outline every issue.
You can easily make a test page to house your snippets, then try them in your target browsers. That has the added advantage of providing a central library for the snippets you do create, so you don't have to go hunting through entire directories looking for that cool little widget you created back in 2010.
Also, you can check the MDN Web Docs Browser Compatibility section if that interface is available (Eg. window.location - https://developer.mozilla.org/en-US/docs/Web/API/Location#browser_compatibility)

A feature rich JavaScript IDE environment?

I'm currently using Visual Studio 2008 to edit .js files with, and it has decent support but I want more...
I like the VS syntax highlighting and auto-indentation features but additionally would like advanced features like: contextual info and help, collapsible JavaScript blocks, implicit symbol understanding for searching, refactoring and that kind of thing; also warnings and errors for the js code.
Suggestions?
Edit: ooops... for the Windows platform. I see some Eclipse answers already and that's fine as I'll install Eclipse on Windows.
Purpose: I want the tool to be feature rich to aid my understanding of what's happening because JavaScript can get quite obtuse when jQuery is being used. Actually, it can be quite obtuse to understand regardless. Plus the additional (non-jQuery) branching for different browsers and tweaks. It can take a long time to wade through.
I use Komodo Edit (link) or Aptana.
Ever try Aptana?
http://www.aptana.org/
ActiveState Komodo Edit works here too. See my answer just posted here.
JetBrains is working on a promising Web/Javascript IDE called WebStorm. They currently have a public preview out:
http://www.jetbrains.com/webide/index.html
It has some interesting features:
Javascript refactoring
DOM-Based, Browser-Specific Completion
Code Navigation and Usages Search
Code Inspections and Quick-Fixes
JavaScript Debugger Based on Mozilla
Frameworks Support (jQuery, Prototype, ...)
My choice is NetBeanse (as IDE).
But more more often i prefer emacs
IntelliJ IDEA by jetbrains is pretty good for javascript:
http://www.jetbrains.com/idea/features/ajax.html

Is there a good javascript plugin for visual studio?

I think that Visual Studio's biggest let down is the Javascript editor. I have been told to use Aptana as an editor for my javascript files, but I would prefer to stick with visual studio if possible.
I have read other similar plugin posts, but none focus specifically on Javascript.
VS2010 may offer some improvements, but will they be up to Apatana standards? I have briefly tested the beta, but I'm not overly impressed.
Is there anything out there that will bring Javascript closer to c# development? Considering the wide spread use of Javascript I think there must be something....... I hope! :)
Many thanks in advance... this is something that has always bugged me!
There's a couple recent plugins that may be helpful :
From Microsoft :
JScript Editor Extensions
Brace Matching
Outlining / Cold-folding
Current Word Highlighting
IntelliSense Doc-Comments Support
JSEnhancements
Outlining and matching braces highlighting
(I wouldn't think installing both of these is a good idea - and the Microsoft plugin has more features so try that one first)
VS is a pretty good IDE (especially when coupled with Resharper) but not so hot with Javascript. The debugger is good and there's the JSLint plugin but other than that I'm not sure. Aptana (based on Eclipse) is an excellent javascript IDE but it doesn't like it much when the javascript is embedded in aspx files (unless they updated the support recently). So far I'm not sure there's an ideal .net platform IDE for both client and server side stuff just yet.
Update: Resharper 6 added pretty good JavaScript support - so now I'd recommend that combination if you're doing a lot of debugging across client and server at the same time. If you're focussing on pure client code then I find WebStorm to be an excellent JavaScript/HTML IDE - even better than Aptana.
I'd really like to recommend Webstorm. It does not! treat your JS as text files.
Its a full blown JS editor and has become my favourite JS editor working in parallel with VS to handle my server side stuff.
WS has actual object intellisense across JS files. That means when I press . (dot) it shows me the functions on that objects, even if its located physically in another file.
It will recognize my objects (or their type if you will) created in other JS files referred to in the file I'm working on.
I have 'Find usages' on JS functions
I have 'find all references' on JS object / function / class / variable or whatever you want to search on. In the end its all objects but Webstorm knows this.
If I change the short/cut to F12, I can press F12 on my function call and it will jump to the implementation of that JS functon. Even if its located in another file.
Ofc. you have code folding and colouring, extract method and other neat code re factoring, overview creating tools.
Oh. And by the way.
I'd like to kill off a rumour going around in the cloud on forums I come across from time to time, looking for better ways to handle JS.
reSharper DO NOT SUPPORT JAVASCRIPT! A little piece of me dies every time I read some guy repeating what he saw on the reSharper site. It may have a some poor intellisense and some low level syntax check, but that has nothing to do with support.
Notepad++ supports JS better than VS in my opinion.
Münster
Don't forget to grab Chirpy to handle minifying your scripts in VS.
If you use Visual Studio, add the
/// <reference path="myOtherJsFile.js" />
directive at top of your js files and install Web Essentials you get pretty decent (but not perfect) intellisense, go to definition by using F12 and find all references (sort of..) by using SHIFT+F12

Categories

Resources