Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable autoindent on enter

I see multiple settings for Code in terms of how to indent (spaces vs tabs), but nothing about how to disable indents. So for example, I enter a <p> tag, hit enter, and Code auto indents the next line. I'd like to disable that but cannot find the setting to do so.

like image 903
Raymond Camden Avatar asked Apr 16 '16 12:04

Raymond Camden


1 Answers

No, there is no option to disable auto indent on enter. But if you need to insure that inline elements remain without extra spaces because it affects the layout you can use the new option, introduced in v1.0: html.format.unformatted - comma separated list of tags that shouldn't be reformatted. Default value null means that all inline elements should remain as you formatted them.

In addition, instead of typing <p> + Enter you can type just p and press tab which will give you a nice <p><\p> and will place the cursor in the middle.

Hope this helps.

like image 172
Jurijs Kovzels Avatar answered Oct 21 '22 09:10

Jurijs Kovzels