DevMis
DevMis

Reputation: 882

VSCode copy-paste problem - it removes indentation and adds extra blank line below on paste

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

Upvotes: 4

Views: 1168

Answers (1)

DevMis
DevMis

Reputation: 882

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.

Upvotes: 1

Related Questions