How to indent tag attributes into column


Sorry if this has already been asked, I’ve looked all over and can’t seem to find anything on it. It would help if I knew what to call it rather than just describe it O.o.

I’m wondering if there was either a package or a way to config auto-indent to be able to do this. The picture is from Codepen, when you hit enter it will automatically put the attribute on the next line, aligned with the attribute above it.

On Atom, doing the same thing, will just return it to the start of the tag on the next line.

Again, sorry if this has already been asked. Thanks!


Atom doesn’t have an auto-align function like that, though I suspect that some beautification packages might.


You could also change your config.cson to add new increaseIndentPattern entries so that hitting return after <[^>]* would increase the indent pattern and >$ would decrease it.