visual-studio-codecopytext-editorpaste

VS Code adds spaces between content when pasting


When I copy this, for example:

<AdmobComponent/>

It pastes as:

< AdmobComponent / >

Does anyone have any suggestions? I don't even know where to start to fix this.


Solution

  • From within the IDE:

    Go to File | Preferences | Settings and then click Text Editor | Formatting. The top option should be FormatOnPaste, make sure this is unchecked.

    If you are using the Prettier extension, then this is a known issue.