Why VScode creating new line on entering each character?

1.3k Views Asked by At

While typing each character, vscode puts a semicolon and move to the next line. Here I used to type 'import' but it appears as ' i; m; p; o; r; t; '. How can I solve this problem?

This is how the characters appear on vscode

2

There are 2 best solutions below

1
On BEST ANSWER

You are in a JavaScript file (ends with .js) and your JavaScript settings are auto-formatting the code.

0
On

For anyone experiencing this issue still, you most likely have autosave on type enabled along with the option to format on each save so this creates a chain of formatting and saving which can lead to the problem. I solved this issue by either disabling auto-save or by disabling format on save option.