Overall some very helpful extensions for working with JS.
It would be even better if the outlining remembered which blocks were open/closed. That way I wouldn't have to re-close everything I'm not working with each time the file is opened...
This is must have extension for Java Script developers who are used to C#/VB code. I needed something like this badly. It would have been better if the shortcut key CTRL+ M + O to collapse outline worked with it too. It would have been awesome.
This is great a addition to my personal view of the "king of IDEs". It's one of those "why haven't other tools done this, its so mind numbingly obvious" pet peeves, that finally gets resolved...by Visual Studio no less!
I don't think I'll ever need any other dev ide - obviously based on the platforms I work in. One might say that means its "too Microsoft-ty"..perhaps, but with Javascript becoming 1st class dev platform, yes, even in the upcomming Windows 8, "simple" (obvious) tools like this in Visual Studio definitely earn developer buy in!
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.