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.
4 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).
2
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
Comment actions Permalink

Hello There, I have the following structure

<div className="shared_assignment_info">
<div className="shared_assignment_info__content">
<h4>Date Created</h4>
{formatDate(createdDate)}
</div>
<div className="shared_assignment_info__content">
<h4>Date Shared</h4>
{formatDate(itemSharedDate)}
</div>
<div className="shared_assignment_info__content">
<h4>Created By</h4>
{createdBy}
</div>
</div>

How can I interchange the position of the first and third nested divs? 

0

Please sign in to leave a comment.