Scott Gordon
Scott Gordon

Reputation: 21

Atom autoclose-html how to force inline closing tags

Brand new to Atom. I see that I can force some html tags to close inline using the autoclose-html package. However, when I populate the list with tags to close inline, they are still closing on a separate line. How should the list be formatted? I see the defaults as

default: ['title', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']

And so I first tried adding ...'p', 'span'] to the list, and it did not work. I then found a list in autoclose-html.coffee and added the same, to no avail. What am I doing wrong?

Upvotes: 2

Views: 4297

Answers (2)

Alfred
Alfred

Reputation: 161

I don't know whether you have fix this issue. I just work it out. It's nothing about this package, it's handled by atom's html-language plugin. Just open Atom->Snippets and add the following codes:

Sorry the preview looks terrible when I post the code as text. So I post a image here.

enter image description here

Upvotes: 0

David Eyre
David Eyre

Reputation: 31

The way I did this (Mac OS - should be same for other OS's):

  • Bring up Atom Settings (Atom menu --> Preferences)
  • Select Packages
  • Select autoclose-html Settings
  • Select View Code

"View Code"

  • Expand the lib folder
  • Select configuration.coffee

"configuration.coffee"

  • Make your changes in there and save the file.
  • Restart Atom

All done!

Upvotes: 3

Related Questions