Netbeans IDE: How to dump large chunks of Javascript code in Netbeans?

I jumped from my handy Dreamweaver IDE to Netbeans and missed the code folding options :(

I can see that with Netbeans you can stack normal functions, but I cannot figure out how to dump large chunks (whole modules). I found fixes for other languages ​​in Netbeans, but they don't seem to work in Javascript. This is very unpleasant when working with my large files with 4000 + ...

Of course there is a way ?! If not, can anyone recommend an IDE that is suitable for JS, CSS, HTML and PHP?

+4
source share
4 answers

Hidden key to add all the data in any type of file " Ctrl + Shift + - (minus sign)".
To fully expand this file, you need to do the opposite, which means " Ctrl + Shift + + (plus sign)".

To view and edit all the keyboard shortcuts in NetBeans IDE, go to " Tools Menu> Options > Keymap Tab".

Hope this helps.

Update for structures of summary codes other than the functions themselves: -
Follow these steps: -

  • Go to this section " Tools Menu> Options > Editor Tab> General Tab".
  • Here you will find 2 sections: Code Summary and Camel Behavior .
  • In the section " Code folding " there are two subsections: " Use code folding " and " Collapse by default ."
  • Check the box next to β€œ Use code fold ” to activate other options in another subsection.
  • In the other " Collapse by default " section, you will find 6 options. Among them, your required parameter is " Tags and other blocks of code ." Check this box to enable code folding for all code structures (for example, " if " and " for " logic ...), and then restart the application (otherwise it CANNOT work).
+6
source
 //<editor-fold defaultstate="collapsed" desc="Your Description"> .... pieces of code .... //</editor-fold> 

loans go to my college teacher

  Edited *
+7
source

NetBeans 7.3 Beta 2 has improved code folding for javascript. You can add custom summary comments to block everything you want:

 // <editor-fold> ... code ... // </editor-fold> 

More details here .

After a week of use, the NetBeans beta mysteriously slowed down. I reinstalled it, which is a bit troublesome, but since then there have been no problems. Code folding is very useful.

+5
source

The short answer is that there is no way to dump code in consistent parades without using their disgusting NB-specific XML tags (which means that anyone looking at your code in any other IDE will be very confusing).

This needs to be fixed, but Oracle doesn't seem to care.

-1
source

Source: https://habr.com/ru/post/1346571/


All Articles