html - Atom - Emmet package: closing comments -


emmet atom: auto comments after html closing tag.

i can't seem find solution problem anywhere i've resorted asking on here.

http://iaintnoextra.tumblr.com/post/68089741466/automatically-add-closing-comments-to-html-using

in sublime text 3, using emmet user preferences file link above, emmet automatically adds comments after closing html tag; example:

div.container 

would produce:

<div class="container"></div><!-- /.container --> 

i can't seem find anywhere within emmet's package settings make happen on atom v1. know can change mimics same functionality?

http://www.devstavern.com/emmet/custom-comments-in-emmet-sublime-atom-and-others/

with of link above managed figure out on own, here's answer:

  1. edit emmet settings on atom.
  2. update extensions path under "settings" heading location you'd save preferences.json file we'll create next, i've created folder in dropbox folder can access file location.
  3. create preferences.json file in folder created, add code below

comment on same line:

{   "filter.commentafter": "<!-- /<%= attr('id', '#') %><%= attr('class', '.') %> -->" } 

comment on new line:

{   "filter.commentafter": "\n<!-- /<%= attr('id', '#') %><%= attr('class', '.') %> -->" } 
  1. go .atom\packages\emmet\node_modules\emmet\lib folder , edit snippets.json.
  2. find html snippet , change filters setting "html, c", automatically add comment end of auto-completed code shown above.

ta-da, works!

update (05/11/15):

make sure restart atom after saving changes.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -