Is there a way to duplicate lines/selection and move them below/up?

I know you can duplicate lines/selection but with a selection the duplicate starts at the end of the initial selection and shortcut to move lines moves lines for sure but since both the selection and the duplicate are on the same lines it moves it all?

For example:
Step 1:
line1
line2

Step 2 - duplicate selected two lines:
line1
line2line1
line2

Step 3 - move the lines:
------------
line1
line2line1
line2

I'm looking for a result that would work the same as VSC does so to go from Step 2 to Step 3 I'd get:
line1
line2
line1
line2

I hope it's clear, I'm probably just stupid and can't find how to do this but move lines is not it as far as I can tell.

1 comment
Comment actions Permalink

Hello,

You are looking for action `Duplicate Entire Lines`. It has no default shortcut assigned, so you should assign it by yourself from `File | Settings | Keymap | Duplicate Entire Lines`.

Hope it helps!

0

Please sign in to leave a comment.