0

I hope my question is clear enough. I am using free version of visual studio express.
When I create a function, there is that "-" or "+" sign next to line number where function is created, which allow me to hide it.
I want to do same thing for my object which is really long because it is storing alot of items. All items are sorted by area, and group which looks like this:

var itemTable = {
groupA: {
    BanditHideout: {
        itemDrop: [
            //Weapons
        {

After all items are listed, there is next area and inside it another item list.
Once all areas are done, we move on to groupB and do the same thing, and there are like 10 groups in total each having 5 areas.
I managed to do it manually using "outlining" option in visual studio, where I mark a whole text and press "Ctrl + M" and then "Ctrl + H" which hide the content and create "+" sign next to line number.

I do that for every part i want to hide, and it works well. My problem is that, I have to do it manually which is bad, because for some reason, sometimes all "+" dissapear, and I am forced to do it all over again.

I hope that I am clear enough and you can help me out somehow :) Let me know if you need more information. I can give you a screenshoot if that will help. Thanks for help in advance

Mariusz
  • 361
  • 1
  • 4
  • 17

1 Answers1

0

You can always use regions :)

#region RegionName
    [some of your code]
#endregion

PS. Well, apparently not always ;]

PS2. Since Visual Studio Community edition has been released, there really is no need for VS Express anymore - it lacks wayy too many features compared to the standard version. BUT - if you're coding only in JavaScript, I'd consider some other, "lighter" IDEs than Visual Studio (off the top of my head - Eclipse or NetBeans, but there's tons of other free IDEs out there).

Andrew Cyrul
  • 249
  • 2
  • 12
  • I am not sure how does it work? Do I just type it inside my code ? Doesn't seem to work for me. I will try to search something in google meantime. Also I didn't say that but I am using javascript not C# – Mariusz Mar 12 '15 at 08:52
  • Yes, just surround the code you want to make hideable with those tags. EDIT: Ahhh, JS... :| Take a look here then: http://stackoverflow.com/questions/1921628/how-to-implement-regions-code-collapse-in-javascript – Andrew Cyrul Mar 12 '15 at 08:55
  • thanks for the link, I can't find macro explorer. I tried to download extension but I am using free version and can't install it ^^ I will keep searching and see if I can find something. Thanks " 2013 still does not support macros! - see bharry blogs.msdn.com/b/bharry/archive/2013/06/03/…" – Mariusz Mar 12 '15 at 09:02
  • Why VS **Express** by the way, when you can get Visual Studio Community (which is basically VS 2013 Professional) for free? – Andrew Cyrul Mar 12 '15 at 09:03
  • I don't know,a friend told me to use express when I started programming in javascript. I will ask him about Professional version later and see how it works :) Thanks for info – Mariusz Mar 12 '15 at 09:04
  • Edit your answer with Visual Studio Community, and I will accept it if you want :) – Mariusz Mar 12 '15 at 09:37
  • Hey, thanks ^^ I am using visual studio because I merge my files together with my github page, not sure if that is necessary to use VS, but I guess that was the main point :) Also, a person that helps me also use VS, so it is even easier to work on it :D – Mariusz Mar 12 '15 at 11:39