I love this and have been waiting for this and wondering why the feature wasn't built in, but one thing I hate is it makes it too easy to select Function with a capital F instead of the lowercase one.
Add go to definition support for functions that reside in the file then it will be great
However the <para> support only seems to work if you are editing a .js file. If you are editing JScript within a <script> element of an HTML page - they don't seem to work.
Good start, but missing some key features of other products in this space.
I've got 3 suggestions: 1) Make the Para extension not break IntelliSense. I've got a function that has 6 inputs, but no matter what parameter I'm entering, the first parameter is always highlighted in the IS window. 2) Instead of installing as 5 separate extensions, use the example of your MS brethren and add a window to the Options window for turning things on and off. It's super annoying to have to restart VS everytime I try to figure out what's wrong with the extensions. (See the Productivity Power Tools extension for an example of the Option window) 3) Include support for Regions.
A nice feature would be to extend the outlining to CSS as well, but that's outside the realm of "JScript", I suppose.
I really liked this extension until it suddenly stopped working! Not sure what's up with it... but now seems to be dead in my system since the latest update.
Why is extension does not support region block like JavaScript & CSS Outlining extension do?
Now I install both this extension(but disable some duplicate extension) and JavaScript & CSS Outlining. My installed JavaScript extensions should be like the following image.
This seems to break the statement completion, so that you *must* hit Enter or CTRL + Space to complete the word, even when IntelliSense has highlighted the correct word. Very frustrating, since it is much easier to just hit . to see the members of the namespace/class.
Another thing that I'd personally really love to see is the class members drop-down from C#. It should list the functions and variables in the current file.
Like regular .Net languages, does this extension support custom collapsible code blocks, e.g.
//#region My block
Code here
//#endregion
or
//region My Block
Code here
//endregion
@rich: how does it work? I tried
//#region My block
Code here
//#endregion
and
//region My Block
Code here
//endregion
I didn't have success with either one of these ...
Thanks
I made this account just to answer this question as I've had the same problem. So in case anybody else runs into this, this is my solution.
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 this a simple compound statement.
The last version of jQuery offered by that vsdoc generator (http://damianedwards.com/vsdoc) is 1.6.2, which is two major revisions out of date. I'd either find a new tool, incentivize that guy to update his tool, or just offer your own vsdoc file for the newest version of jQuery.
function $(tag) {
/// <summary>
/// return:ele
/// </summary>
/// <param name="tag" type="str">标签名</param>
return document.getElementById(tag);
}
/// <reference path="tools.js"/>
Reference tools.js, the $ commentary has Chinese; Write $ ,you will see garbled;
if tools.js is not utf-8,it`s wrong.Now I can not set 'utf-8' with tool.js
$(tag)
return:ele
???K???
Is it possible to configure formatting? What I really want - the main reason that I installed this extension - is the ability to pretty print JSON files. When working with large-ish (e.g. 500 line) JSON files, they are always returned to me on one *long* line, which is impossible to read. There are other JSON pretty printers out there, but I would like to be able to do this in VS.
As it stands, opening a JSON file (which I have typed to be represented the same as JavaScript) and selecting Edit > Advanced > Format Document just results in spaces being inserted after commas and some braces.
The comment auto-complete ///<summary></summary> functionality worked immediately after I installed but has since stopped working. Are there any known conflicts with out extensions or ReSharper?
I have the JScript Editor as well as Javascript Parser, and ReSharper installed.