简体   繁体   中英

Code folding in Netbeans for javascript

I just recently started using Netbeans, and i have been working with javascript files, the files are becoming large, and i want the ability to group function in something like this in visual studio, actually code folding.

#region
code goes here
#endregion

After a search i found out that you could use

//<editor-fold> </editor-fold>

http://wiki.netbeans.org/FaqCustomCodeFolds

but this does not work with .js files, as it's treated like a comment.

Please advise, how to add custom code folding in Netbean on javascript files.

Currently the custom code folding is not supported on javascript files to the current editor.

But will soon be implemented in the new editor in the official distribution of netbeans,
That allows you to edit your javascript files, with all features currently available in other programming languages.

New JavaScript Editor

But if you can not wait more , then you can download the Develoment Version of NetBeans Implementing the new editor, without losing your current project settings.

Also you will can create your template code, for make a surround block code.
Explained in this link .

And this is the new editor in test

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM