Is there a way to convince the VBA editor in Excel to stop auto-formatting lines to remove the space at the end when I pause in my typing for a quarter second?
Turn off Tools > Options > General > Background Compile. This solved it for me.
Tools > Options > General > Background Compile