My first snippet doesn't work :-(


I tried making a snippet but it doesn’t work. :frowning:

  'HTML5 Skeleton':
    'prefix': 'html5'
    'body': """
    <!DOCTYPE html>
    <html lang="en">
        <meta charset="UTF-8">
        <link rel="stylesheet" href="styles.css">


The html snippet isn’t complete, IMHO. :slight_smile: When I create a new .html file and type in html5 and TAB nothing happens. Any ideas what the problem is?

And please tell me if this snippet already exists! I tried installing the package autocomplete-html but it made Atom crash every minute or two. I had to uninstall Atom from the terminal and do a fresh install.


It has to be properly formatted (with tabs).
This one works for me:

  'HTML5 Skeleton':
    'prefix': 'html5'
    'body': "foo"

When you open your snippets.cson, type snip and press tab you get a nice snippet placeholder.

See also:


It works perfectly. Apparently I had to shut down Atom and restart it for the snippet to start working.

And I don’t know why my snippet didn’t display properly in my post! Ask me if you want the snippet, it’s like the html snippet but adds the doctype, charset, a link to a stylesheet. etc.


I went ahead and fixed the original post. The board supports fenced code blocks as in GitHub-Flavored Markdown.


Thanks! I’ll look into the fenced code blocks.