Netbeans IDE:如何在 Netbeans 中折叠大块 Javascript 代码?
我已经从舒适的 Dreamweaver IDE 跃迁到 Netbeans,但缺少代码折叠选项 :(
我发现使用 Netbeans 可以折叠普通函数,但我似乎不知道如何折叠大函数我在 Netbeans 中找到了其他语言的修复程序,但它们似乎不适用于 Javascript。在处理 4000 多行的大型文件时,这非常令人沮丧……
当然有办法吗?没有人可以推荐一个适用于 JS、CSS、HTML 和 PHP 的 IDE 吗?
I have taken the leap from my comfortable dreamweaver IDE to Netbeans and am missing my code folding options :(
I see with Netbeans you can fold normal functions but I can't seem to work out how to fold large chunks (entire modules). I have found fixes for other languages in Netbeans but they don't seem to work in Javascript. This is very frustrating when working on my large 4000+ line files...
Surely there is a way?! If not can anyone recommend an IDE that is good for JS, CSS, HTML and PHP?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
学分归我大学老师所有
credits goes to my teacher in college
折叠任何文件类型中的所有数据的快捷键是“
Ctrl
+Shift
+-
(减号)”。要完全展开该文件,您需要执行相反的操作,即“
Ctrl
+Shift
++
(加号)”。去看&编辑 NetBeans IDE 的整个键盘快捷键,请转到“
Tools
Menu >Options
>Keymap
Tab”。希望有帮助。
除函数本身之外的折叠代码结构的更新:-
请按照以下步骤操作:-
工具
菜单>选项
>编辑器
选项卡>常规
子选项卡”。if
”和“for
”逻辑,...),然后重新启动应用程序(否则它可能无法工作)。The shortcut key for folding all of the data in any file type is "
Ctrl
+Shift
+-
(minus sign)".To expand fully that file, you need to do the opposite, which is "
Ctrl
+Shift
++
(plus sign)".To see & edit the whole Keyboard Shortcuts of NetBeans IDE, please go to the "
Tools
Menu >Options
>Keymap
Tab".Hope it helps.
Update for Folding Code Structures other than the Functions itself:-
Follow these steps:-
Tools
Menu >Options
>Editor
Tab >General
Sub-Tab".if
" & "for
" logic, ...), and then restart the application (otherwise it MAY NOT work).NetBeans 7.3 Beta 2 改进了 JavaScript 的代码折叠。您可以添加自定义折叠注释来阻止您想要的任何内容:
更多信息此处。
使用一周后,NetBeans 测试版的速度神秘地变慢了。我重新安装了它,这有点麻烦,但从那以后就没有问题了。代码折叠非常有帮助。
NetBeans 7.3 Beta 2 has improved code-folding for javascript. You can add custom fold comments to block off whatever you want:
More information here.
After a week of use the beta version of NetBeans mysteriously slowed down. I reinstalled it, which is a bit of a chore, but no problems since then. The code folding is very helpful.
简而言之,如果不使用可怕的 NB 特定 XML 标签,就无法通过匹配的括号来折叠代码(这意味着其他人在任何其他 IDE 中查看您的代码都会感到非常困惑)。
这个问题需要解决,但 Oracle 似乎并不关心。
The short answer is that there is no way to fold code by matched parens with out using their hideous NB specific XML tags (which means anyone else looking at your code in any other IDE is going to get extremely confused).
This needs to be fixed but Oracle doesn't seem to care.