Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop copying the white space, on a blank line, in Visual Studio Code?

Tags:

In visual studio code, if you press ctrl + c on a blank line, with nothing highlighted, it copies the blank line.

I thought there may was an option to disable this, but haven't been able to find it.

like image 364
Sol Avatar asked Mar 03 '17 20:03

Sol


People also ask

How do you remove unwanted space in VSCode?

Well, place the cursor into the line from where you want to clean it up and then navigate to Edit -> Advanced -> Delete Horizontal White Space or press Ctrl + E , \ . That will automatically remove the additional spaces from your code.

How do I remove a space dot in Visual Studio?

Edit -> Advanced -> untick View White Space.

What does Ctrl space do in VSCode?

You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.) in JavaScript).


2 Answers

You should be able to do this by configuring the option editor.emptySelectionClipboard to false.

like image 157
Bill_Stewart Avatar answered Sep 17 '22 02:09

Bill_Stewart


There is an extension for it: https://marketplace.visualstudio.com/items?itemName=usernamehw.do-not-copy-empty

like image 28
nvd Avatar answered Sep 17 '22 02:09

nvd