0

I'd like to know how to select text between curly brackets, with just two or three shortcut keys.

E.g.: If I have code like this:

System.out.println("Hello World");

only the text "Hello World" should be selected.

csalmhof
  • 1,820
  • 2
  • 15
  • 24

2 Answers2

6

Based on documentation, you can use:

On Windows/Linux

Ctrl+W / Ctrl+Shift+W

On MacOS

⌥↑ / ⌥↓

Each subsequent call to the shortcut selects an increasing range of code (or decreasing, for second shortcut).

M. Dudek
  • 978
  • 7
  • 28
  • 1
    *Option+Arrow Up/Down* on macOS. – s0xzwasd Jun 15 '21 at 11:48
  • On MacOS I [see](https://blog.jetbrains.com/idea/2013/05/30-days-with-intellij-idea-editor-basics/) `Cmd + W` – M. Dudek Jun 15 '21 at 11:57
  • 1
    It looks like an outdated article. Currently, it's *Option+Arrow Up/Down*, please see https://www.jetbrains.com/help/idea/working-with-source-code.html#editor_code_selection (switch to macOS shortcuts) – s0xzwasd Jun 15 '21 at 12:08
0

try this plugin out: https://plugins.jetbrains.com/plugin/11322-bracket-selection

"default mouse shortcut: alt button1 doubleclick or hold alt -> double left click anywhere in between brackets in human terms"

RoadJDK
  • 11
  • 1
  • 3