REQ: Switch lines

In some IDEs there is a command to switch/invert/transpose two lines.
For instance, with the caret on line 2:

line1
line2

with a shortcut, you obtain

line2
line1

The cursor follows line2, so you can quickly move it up a few spots by repeatedly activating the shortcut.
3 comments
Comment actions Permalink
You can press "Shift+Alt+Up" or "Shift+Alt+Down" ("move a line" action, see PyCharm webhelp: https://www.jetbrains.com/idea/help/adding-deleting-and-moving-lines.html).
1
Comment actions Permalink
Wow, perfect! Thank you so much. :)
1
Comment actions Permalink

Please Notice that it is Right Shift and Right Alt. cheers!

1

Please sign in to leave a comment.