Code alignment


#1

My code was on the left and I pressed a key and now my code is in the center, how do I get it back to normal?


#2

I have multiple thoughts.

  1. Are there actually whitespace characters there on the right edge of your document? Is it indented at an extreme level or is the text just displayed in the wrong space?
  2. Open File -> Settings, click on Editor, check Show Invisibles, and then take a screenshot of the same files.
  3. There are packages that format your code for you, but nothing that should do something like that. If it’s just crazy indentation, atom-beautify should fix it for you. In theory, a poorly configured beautifier might do something like this, in which case atom-beautify might be the culprit. What packages do you have installed?

#3

Hi,

This is how it looks after show invisibles is selected.
I only have Emmet installed.
This is the first time I used atom and was following a you-tube vid (https://www.youtube.com/watch?v=1ZyDCt8QLxE&t=82s), then I got my code all centered and the guy on the video did not even know how to fix it.

Installed beutify and it is still the same.


#4

Close Atom, go to your user folder, and rename the folder there named .atom/ to something else. Then reopen Atom. It will create a new, blank config folder, and this might solve the problem.