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:
- edit emmet settings on atom.
- 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.
- 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', '.') %> -->" }
- go
.atom\packages\emmet\node_modules\emmet\lib
folder , edit snippets.json. - 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
Post a Comment