Enclose selected code in curly braces, parentheses, or double quotes

When you have selected code and enter one of the following opening characters, the matching closing character is added automatically at the end of the selection:

  • {
  • (
  • "

To specify whether to automatically insert matching characters, select Edit > Preferences > Text Editor > Completion.

"Completion preferences"