Remove block shortcut?

Is there a remove block shortcut?

synchronized (blub) {
} I'd like to place the cursor on synchronized and have the statement plus closing brace removed and the block ]]> unindented. Kind of an inverse "surround with" functionality.

I guess it's there, but I didn't find it... Can anybody point me to the right place?

Best,

Dirk Dittert

6 comments

I've wanted something like this, especially for removing method calls
like outer(inner(x)) -> outer(x). I usually end up doing Ctrl-W, Ctrl+X,
CtrlW, CtrlV as a workaround though.

Dirk Dittert wrote:

Is there a remove block shortcut?

synchronized (blub) { <stuff here> }

I'd like to place the cursor on synchronized and have the statement
plus closing brace removed and the block <stuff here> unindented.
Kind of an inverse "surround with" functionality.

I guess it's there, but I didn't find it... Can anybody point me to
the right place?

Best,

Dirk Dittert

0

Hello Dirk,

There's no such action implemented though simple tip exists: Do Ctrl+W until
block content is selected then CtrlX then a few more CtrlW to select (now
empty) synchronized statement and finally Ctrl+V.

-


Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Maxim Shafirov (JetBrains) wrote:

Hello Dirk,

There's no such action implemented though simple tip exists: Do Ctrl+W
until block content is selected then CtrlX then a few more CtrlW to
select (now empty) synchronized statement and finally Ctrl+V.


Or - if you don't want to clutter your clipboard - highlight the block
content, then do Ctrl-Shift-Up (or Down) and then remove the empty
synchronized statement.

Regards,
Jens

0

Dirk Dittert <no_mail@jetbrains.com> wrote:

Is there a remove block shortcut?


Should have looked before posting. It's IDEABKL-3053 (and some
duplicates).

Best,

Dirk Dittert

0

Bas Leijdekkers <leijdekkers@SPAMBLOCK.carp-technologies.nl> wrote:

Etienne Studer's "Simple Intentions" plugin has an intention for this
action.


I'll give it a try. Thanks, Bas.

Best,

Dirk Dittert

0

Please sign in to leave a comment.