Sublime Forum

Enable Auto indent in editor?

#1

My code isn’t auto-indenting like in ST2. How do I make new lines auto-indent?

0 Likes

#2

Yes, this is a change that occurred at some point last year to the indentation rules for HTML. I guess few complain about it because the more common working method is to type

div[tab] which gives you <div>|<div>

Hitting enter then autoindents for you - same for any tag. This worked in ST2 as well. But the old autoindent way might be a loss for some. The HTML autoindent rules can be fixed to get that behaviour back, documented here. If you want to know more, I recommend looking at the github links on that thread too, as there’s useful additional info there.

By the way, if you like the ‘new’ way of doing it, it gets even better if you install Emmet :slight_smile:

0 Likes

#3

ST2 hasn’t been touched in years, consider using ST3. ST3 has HTML auto indentation from build 3130 onwards.

0 Likes