Netbeans IDE:如何在 Netbeans 中折叠大块 Javascript 代码? [英] Netbeans IDE : How do I fold large chunks of Javascript code in Netbeans?
问题描述
我已经从舒适的 Dreamweaver IDE 飞跃到 Netbeans,但缺少代码折叠选项:(
我看到使用 Netbeans 可以折叠普通功能,但我似乎无法弄清楚如何折叠大块(整个模块).我在 Netbeans 中找到了针对其他语言的修复程序,但它们似乎不适用于 Javascript.在处理我的 4000 多个行文件时,这非常令人沮丧...
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...
肯定有办法吗?!如果没有,谁能推荐一个适合 JS、CSS、HTML 和 PHP 的 IDE?
Surely there is a way?! If not can anyone recommend an IDE that is good for JS, CSS, HTML and PHP?
推荐答案
折叠任意文件类型中所有数据的快捷键是Ctrl
+ Shift
+-
(减号)".
要完全展开该文件,您需要执行相反的操作,即Ctrl
+ Shift
+ +
(加号)".
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)".
看&编辑 NetBeans IDE 的整个键盘快捷键,请转到Tools
Menu > Options
> Keymap
Tab".
To see & edit the whole Keyboard Shortcuts of NetBeans IDE, please go to the "Tools
Menu > Options
> Keymap
Tab".
希望有帮助.
除函数本身之外的折叠代码结构的更新:-
请按照以下步骤操作:-
Update for Folding Code Structures other than the Functions itself:-
Follow these steps:-
- 转到此部分
Tools
Menu >Options
>Editor
Tab >General
Sub-Tab". - 您会在其中找到 2 个部分 - 代码折叠"&Camel Case 行为".
- 在代码折叠"部分,有两个子部分——使用代码折叠"&默认折叠".
- 选中使用代码折叠"子部分的复选框,以激活其他子部分的其他选项.
- 在另一个子部分默认折叠"中,您将找到 6 个选项.其中,您需要的选项是标签和其他代码块".选中此选项的复选框,以激活所有代码结构的代码折叠(如
if
"和for
"逻辑,...),然后重新启动应用程序(否则它可能不起作用).
- Go to this section "
Tools
Menu >Options
>Editor
Tab >General
Sub-Tab". - You will find 2 sections in there - "Code Folding" & "Camel Case Behavior".
- In the section of "Code Folding", there are two sub-sections - "Use Code Folding" & "Collapse by Default".
- Check the checkbox for the sub-section "Use Code Folding", to activate the other options of the other sub-section.
- In the other sub-section "Collapse by Default", you will find 6 options. Among them, your required option is the "Tags and Other Code Blocks". Check the checkbox of this option, to activate code folding for all code structures (like "
if
" & "for
" logic, ...), and then restart the application (otherwise it MAY NOT work).
这篇关于Netbeans IDE:如何在 Netbeans 中折叠大块 Javascript 代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!