Visual Studio Code cursor jumps to end of file

Viewed 1546

I want to use VS Code to edit an existing HTML file.

When I try to enter a new paragraph after I type <p, when I type the closing bracket,>, it is entered at the end of the document after the closing </html> tag, so I have </html>> as the last line of the document. The curser is also right there at the end of the document, instead of where I was trying to make a new text entry.

I must be missing something very simple, but I sure can't find it in the volumes and volumes of documentation.

I have other problems too, but if I could learn how to enter new text it would get me started!

I'm afraid VS Code is one of those apps that is so 'capable' that, as a beginner, it is hard to get all the options right.

Thanks.

1 Answers

You have auto-save and auto code formatting enabled.

Disable code formatting on save (File > Preferences).

In my case, code formatting was disabled, but a rogue formatting extension (plugin) was causing problems. Uninstall formatting extensions to find which one.

Related