How to select all things inside brackets in Intellij idea?

836 Views Asked by At

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.

2

There are 2 best solutions below

0
RoadJDK On

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"

3
M. Dudek On

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).