This is not exactly what you need, but it is pretty close:
Select the code inside the if by placing the cursor in one bracket and pressing Ctrl + Shift + ] .
Now press Ctrl + Shift + Alt + Left Arrow . This will cause the code to move βto the left,β that is, outside the if statement.
You do not need to comment on the if after that, because it is empty.
Note that you can also move the right code to put it back in the if later.
source share