用于折叠/展开方法的 NetBeans 快捷键 [英] NetBeans shortcut key for collapsing/expanding a method

查看:17
本文介绍了用于折叠/展开方法的 NetBeans 快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Java - NETBEANS

JAVA - NETBEANS

这是一个 IDE 问题

This is an IDE question

我总是使用折叠方法,因为我希望能够同时看到我的方法.这有点耗时,因为我必须使用鼠标向上滚动到方法的声明并单击 -(减号)图标.然后分别转到我要处理的方法并单击+(加号)图标.

I am always working with collapsed methods, because I want to be able to see my methods all together. This is a little time consuming because I have to use the mouse to scroll up to the declaration of the method and click on the - (minus) icon. And then respectively go to the method I want to work on and click on the + (plus) icon.

有没有办法通过键盘快捷键进行折叠(和展开)?

Is there a way through a keyboard shortcut to do the collapse (and respectively the expand)?

推荐答案

我从 http://wiki 复制了一篇文章.netbeans.org/KeymapProfileFor60.

第一个选项适用于 Win/Lin,第二个选项适用于 Mac.

The first option is for Win/Lin and the second for Mac.

Collapse (hide) a block                     Ctrl + Minus                 Cmd + Minus
Collapse (hide) a block                     Ctrl + NumPad Minus     
Collapse (hide) all code blocks             Ctrl + Shift + NumPad Minus  Cmd + Shift + Minus
Expand a Collapsed Block (expand-fold)      Ctrl + Plus                  Cmd + Plus
Expand a Collapsed Block (expand-fold)      Ctrl + NumPad Plus  
Expand a Collapsed Block (expand-fold)      Ctrl + Equals                Cmd + Equals
Expand all code blocks (expand-all-folds)   Ctrl + Shift + NumPad Plus  
Expand all code blocks (expand-all-folds)   Ctrl + Shift + Plus          Cmd + Shift + Plus
Expand all code blocks (expand-all-folds)   Ctrl + Shift + Equals        Cmd + Shift + Equals 

这篇关于用于折叠/展开方法的 NetBeans 快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆