4

VSCode has some copy-paste problem. I copy a line without selecting a line, just click on the line and press ctrl+c.

But when I paste (ctrl+v) the copied line it removes indentation and adds extra blank line below. How can I fix it?

img

Developer Mister
  • 572
  • 3
  • 11

1 Answers1

1

I found a partial solution to the problem. According to this answer I Added these lines to keybindings.json:

{
  "key": "ctrl+shift+v",
  "command": "editor.action.insertSnippet",
  "args": { "snippet": "$CLIPBOARD" },
  "when": "inputFocus"
}

But now when I make paste operation it puts extra space:

enter image description here

So, how to trimLeft copied line, this is the question!

UPDATE: Full solution by using extension is here.

Developer Mister
  • 572
  • 3
  • 11