# Collapse matching brackets [duplicate]

This question already has an answer here:

Well I'm not sure this is a good question for this site, but after reading the FAQ section it appears to be OK, so ...

The question is related to the interface and not to computation difficulties. I'm trying to make a panel full of rows and columns and such, but it's getting quite messy to keep track of all the brackets. Is there something in the interface where I can collapse cells wrapped by matching brackets?

-

## marked as duplicate by Szabolcs, Yves Klett, Artes, m_goldberg, R. M.♦Mar 2 '13 at 0:46

Do you already know the multi-click fonctionality ? : when you click several times on a symbol, it extends the selection according to matching brackets. You can also multi-click a simple bracket. – andre Mar 1 '13 at 12:33
@andre I never noticed it and it's definitely useful but something like what Netbeans does in java or c (this are the ones I know) would be outstanding and very efficient. – PML Mar 1 '13 at 12:47
Do you mean collapsing of the vertical brackets / cell groupings on the rhs of a notebook? – Yves Klett Mar 1 '13 at 13:05
@YvesKlett Yes something like that. But if I understand it right I would loose the indentations and I don't know how to cell group inside a unique large cell in order to evaluate all the inner cells as a continuous code...Is there a way to do that? – PML Mar 1 '13 at 13:12

This functionality is simply not available in the Front End. I doubt that as a user it's possible to implement practical and usable code folding in the front end. WRI would have to add it.

Some text editors do have this functionality though:

The Wolfram Workbench can fold functions, but not parts of functions.

Sublime Text supports indent based folding (i.e. it's not based on the brackets).

You may want to use these for working on large functions or packages.

Alternative solutions for keeping track of brackets are using bracket highlighting (new in version 9), Edit -> Check Balance (Shift-Command-B) and Edit -> Extend Selection (Control-.).

-
Well it's a shame that it's not implemented in eclipse. The brackets highlighting is certainly a nice improvement but could go a little further. Thank you for you very complete answer. – PML Mar 1 '13 at 18:20