Pair Completion, Smart Enter, and Smart Semicolons
See Also
When you edit Java classes, the Source Editor does "smart" matching of pair
characters such as brackets, parentheses, and quotation marks. When you type
one of these characters, the Source Editor automatically inserts the closing
character. When you type a semicolon (;), the semicolon is automatically inserted at the
end of the statement. If you type the closing character yourself, the Source Editor
removes the character it added automatically, so the closing character is not duplicated.
In addition, you can:
- Use the Shift-Enter keyboard shortcut to start a new line
when the insertion point rests before the closing pair character.
- Split a string over two lines by pressing Enter while you are typing the string.
The quoted text is split over two lines with corresponding quotation marks and plus (+)
symbol added automatically.
- Move to the next line without splitting
the current line by typing Shift-Enter.
To turn off the pair matching and smart enter features:
- Choose Tools > Options, click Editor, and select the General tab.
- Deselect the Insert Closing Brackets Automatically checkbox.
- You can press Ctrl-Enter to split the current line at the insertion point without
moving the insertion point to the next line.
- See Also
- Configuring the Source Editor
- Editor Shortcuts
Legal Notices