IDE 2 editor erratic

I just installed IDE 2.0 on a Windows 10 desktop, and appreciate many of the new bells and whistles, but am surprised by its seemingly flaky behavior when it comes to new lines and indents. The cursor does not stay put. It typically starts with the expected auto-indent, but after a second or two might jump back to the beginning of the line, and sometimes onto a new line. Has anyone else had this experience? Is there anything that can be done about it (apart from using 1.8)? Thanks.

Hi @couldabin. This bug is being tracked by the Arduino IDE developers here:

I'll provide instructions for the simple workaround that was discovered by an Arduino forum member:

  1. Open the "Command Palette" via the Ctrl+Shift+P (Command+Shift+P for macOS users) keyboard shortcut.
  2. Select the "Preferences: Open Settings (UI)" command.
  3. A "Preferences" tab will now open in the Arduino IDE main panel. In the "Search Settings" field, type editor.trimAutoWhitespace
  4. Uncheck the checkbox next to " Remove trailing auto inserted whitespace."
  5. Click the X icon on the "Preferences" tab.

Please let me know if you have any questions or problems while following those instructions.

Hi @ptillisch, thanks for this tip. I was able to find the setting (the exact language may have been revised) but the box was already unchecked. I am including a screenshot. Thanks for your help.

Hi. I apologize. I got the setting ID wrong in my instructions. You are looking at a different setting. Please follow these instructions:

  1. Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
  2. Select the "Preferences: Open Settings (UI)" command from the menu.
  3. A "Preferences" tab will now open in the Arduino IDE main panel. In the "Search Settings" field, type editor.trimAutoWhitespace
  4. Uncheck the box next to " Remove trailing auto inserted whitespace."
  5. Close the Preferences tab by clicking its X icon.

Note the search query must be editor.trimAutoWhitespace, not files.trimAutoWhitespace as I specified in my previous incorrect instructions.


Please let me know if you have any questions or problems while following those instructions.

That did it! Thanks much for your help.

You are welcome. I'm glad it is working now.

Regards,
Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.