Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently got into Netbeans. I used to code in Visual studio, so I'm trying to figure out what all the shortcuts are that I used to use in Visual Studio. CTRL-SHIFT-S, for one, is the same. But I don't (and can't find online) the shortcut keys to minimise all FUNCTION in the code.


function bla() {
  print 'hello';
  print 'world';

will become:

function bla() {..}

(i.e. minimised)

Anyone know how to do that?

share|improve this question

migrated from Oct 3 '11 at 4:15

This question came from our site for professional and enthusiast programmers.

I hope I'm allowed to ask this in the comment, but why? I code in PHP using Netbeans? Isn't this like a gray area? – coderama Oct 1 '11 at 11:26
up vote 4 down vote accepted

The default is CTRL+SHIFT+-. But you can adjust this in Tools -> Options -> Keymap.

share|improve this answer
This collapses everything. Not just functions. It also collapses classes, code blocks (if, while, etc) and even comments. This means that if a function has 3 ifs, a couple of loops and 5 multiline comments, you'll have to click 11 times to expand the functions and the other 10 collapsed blocks inside it. – Odys Mar 16 '15 at 0:43

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


share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .