Is there any shortcut key to move a line above or below a block? This feature exists in IntelliJ editors and maybe also in visual studio.
You can use Alt+Up to move a line up one line. Is there any such shortcut key to move the line above an entire block above?
In the example below, it’s to move the line a = 1;
above the if
block
Advertisement
Answer
There is no single command for moving current line above/below adjacent block (at this moment), but you can get pretty close by selecting and moving the block instead. Expand selection
(ShiftAltRightArrow) and “normal” Move line up/down
(AltUp/Down) will come handy here: