I already found that the "command": "editor.action.duplicateSelection"
will duplicate the selection right next to it.
I want to duplicate the selected text to a new line. The selection may not be the entire line.
CodePudding user response:
If you are talking about a selection that is less than the entire line, there is no built-in way to duplicate selected text to the next line. It can be done with a macro extension which enables you to run multiple commands at once.
Demo with adding static text to the duplicated text:
CodePudding user response:
Click File > Preferences > Keyboard Shortcuts: Look for the Copy Line Down keyboard shortcut.