vi is for cool kids.
If nothing is selected, Ctrl + D will duplicate the line the cursor is in and insert it right below the line in focus. If you'd like to duplicate a specific set of code, simply select the portion of code you want to duplicate before invoking the duplicate code command.
duplicate-finder package A very simple VS Code extension to identify duplicated lines. Select lines where you want to list the lines appearring twice or more, press Cmd+Alt+L and it will print bellow the duplicated lines.
So, Duplicate lines => CTRL + D. Move a line/selection of code Up/Down => Ctrl + Shift + UP / DOWN.
After @joe's answer, Jared Parsons created the great VsVim. It's been featured on Visual Studio Gallery. It's a ready extension package. I downloaded it, ran the file and it worked out of the box. It's free, too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With