Reputation: 143
How do i fix this problem of VS-Code in which it automatically jumps to next line after i type in one letter. Here is the example of the problem in the image It automatically goes into next line without the pressing the enter key. How do I solve this issue?This is the problem jumping into next line
Upvotes: 12
Views: 12173
Reputation: 59
In Visual Studio Code, autosave automatically saves your files as you work on them. When autosave is enabled, it triggers a file save operation in the background, which can cause the cursor to move to the next line after you type anything. This behavior is a result of the code editor responding to the file save event.
To prevent this issue, you can disable the autosave feature in Visual Studio Code. Here's how to do it:
It's worth noting that by disabling autosave, you'll need to manually save your files using the "Save" command (shortcut: Ctrl + S or Cmd + S) to persist your changes.
By following these steps to disable autosave in Visual Studio Code, you should be able to resolve the issue of your code automatically going to the next line after typing.
Upvotes: 4
Reputation: 341
I had the same issue. I found that the issue was because I had insert_final_newline = true
in an .editorconfig file at the root of my workspace.
Change that value to false, comment it out or remove the file altogether.
I arrived at this solution after disabling all extensions then enabling them individually. EditorConfig for VS Code was the plugin caused the issue.
Upvotes: 24
Reputation: 61
there might be several reasons.
files.insertFinalNewline
eslint
, prettier
, etc.Upvotes: 1