Newbie here ... I started using the 'old' 1.8.16 ide, but thought I'd give the new beta a go.
I get some really weird auto-newlines being inserted - I notice it particularly with comments ...
I'll position my cursor at the end of a regular statement, the press return. The cursor opens a newline, and positions itself correctly to whatever the current indent is. Great.
I type '//' and the editor inserts '// ' at column 1. Not what I want as I'd prefer the comments to obey the current indent position, but I can live with that.
Now I type my comment. After about 4 chars, the cursor drops to the next lower line, column 1 and inserts my text. No newline has been inserted, so the comment chars are added to the beginning of the next line of code. This is really BAD.
If I backtrack to the beginning of my comment and press backspace, the comment is joined up to the previous line, but with a load of extra whitespace.
I now have to manually sort out the comment line, AND the code line.
This gets VERY annoying
My host system is Linux Mint 19.2 Cinnamon (based on Ubuntu 18.04 'bionic')
java -version gives
java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.18.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.18.04, mixed mode, sharing)
Do I need any special OS requirements - I didn't spot any when I loaded the beta ?
I can't find anyone else experiencing this kind of problem ... which leads me to believe the problem is something simple that I'm missing.
Unfortunately, I am not aware of a workaround for this bug, so your only option would be to use Arduino IDE 1.8.16 until the bug in Arduino IDE 2.x is fixed.
If anyone has any ideas about a fix/workaround, or any other information about the issue, please do comment here. Unfortunately, I have not been afflicted by this problem. I say "unfortunately" because I'm a beta tester and would be able to more effectively investigate the problem if I could reproduce it myself.
If you have a GitHub account, you can subscribe to the issue report in order to get notifications about any progress the developers have on finding a fix. If you do that, please subscribe to this bug report:
I didn't notice while making my previous reply that the bug report I linked to had been closed as a duplicate https://github.com/arduino/arduino-ide/issues/437 will be used as the sole unique bug report for tracking the situation.
I can add some extra info here which may help diagnose the issue. I don't have a github user, so I can't add this to the open bug, but please add it if you feel the info would help.
This problem seems to be timing related. If I cut and paste using the mouse a section of code from another window, (either a gedit window or another arduino ide window) the code goes in 100% correct. No problems at all.
If I type it in manually ... newlines and bad formatting happen 90% of the time (I don't type very fast, and often stop to think when I type ).
The system I'm using for this development work is pretty chunky ... it's an 8 core Intel i7 (can't remember the processor number, but was only bought a year ago) and I have 32 Gb of ram ... way over specced for this job. But given the timing issues noted above, debug engineers may have to use a powerful system to catch the problem.
In any case I certainly see the issue on 90% of the lines that I type ... which makes beta 12 basically unusable for me