views:

92

answers:

1

So I have been programming in C++ with Eclipse and have the habit of hitting enter to skip parentheses (anyone who has ever used eclipse probably knows what I am talking about).

I have recently started learning Java and decided to use NetBeans, mostly due to the much more simple interface.

However, I would like to know if there a way to skip the (), [], <> and "" on enter just like what happens in Eclipse in NetBeans.

Thanks.

+2  A: 

This should be this option:

alt text

From the general Editor features:

By default, the IDE automatically inserts matching pairs of braces, brackets, and quotes.
When you type an opening curly brace and then press Enter, the closing brace is added automatically.
For (, [, ", and ', the editor inserts a matching pair right away.
If, for some reason, this feature is disabled, enable it as follows:
Choose Tools > Options > Editor > Code Completion.
Select the Insert Closing Brackets Automatically checkbox.

The editor also highlights matching pairs of braces, brackets and quotes.
For example, place the cursor before any brace or bracket and, if it has a matching pair, both will be highlighted in yellow.
Single brackets of any type are highlighted in red and the error mark is displayed in the lefthand margin.
To customize the highlight colors, choose Tools > Options > Fonts & Colors > Highlighting.

VonC
Thanks for your answer. That was useful, however, that wasn't what I was looking for.
nunos