Automate Adding Closing Comments With Atom

When writing HTML I like to have closing comments after elements. You can do this with a special file.

On Macs, the file will be located in the home directory.

$ cd

Takes you to your home directory.

Then create an emmet folder in your home directory.

Inside your emmet directory create the syntaxProfiles.json file.

Add this inside it

{
  "html": {
    "tag_case": "lower",
    "attr_quotes": "double",
    "self_closing_tag": true,
    "filters": "html, c"
  },
  "jsx": {
    "tag_case": "lower",
    "attr_quotes": "double",
    "self_closing_tag": true
  }
}

In your HTML you see ‘filters’ the c is what adds the closing comment

Some people like to use single quotes instead of double quotes. Just update your attr_quotes value and you will be off to the races.

The JSX is in case you are working with HTML inside your JSX files.

Dash is essential for web developers

Free. That is a cool word to hear these days and Dash is free. Do you find yourself looking all over the internet for the documentation you need to dig into for a specific language? I just downloaded Dash and in a matter of moments I added all the documentation for stuff like Meteor, Bootstrap, CSS, LESS, HTML, JavaScript, MongoDB, GIT (it’s in the Man Pages), JQuery (and it’s various flavors)… to name just a few. Now I save precious seconds when researching a method or a property. It’s offline so instantly accessible. What a great idea!

Download it and reap the rewards.