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.
This should be this option:
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 theInsert 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, chooseTools > Options > Fonts & Colors > Highlighting
.
精彩评论