Use a custom snippet over a builtin one?


The normal snippet from typing div and the [tab] is

<div id="name">


I created one I would rather use, added it to snippets.cson

   'prefix': 'div'
   'body': '<div${1: class="${2:row}"}>\n\t$3\n</div>'

However, when I type div and tab I always get the builtin one.

How to modify an existing snippet?

Your scope is wrong. The scope for an html file is .text.html.basic

    ".text.html.basic": {
        "Div": {
            "prefix": "div",
            "body": "<div${1: class='${2:row}'}>\n\t$3\n</div>"

I’ve created a package that takes care of most annoyances while creating snippets. Thanks to you I finally found out why sometimes snippets wouldn’t activate x]


Can someone please answer his question?


To which question are you referring @Obsidian_Jackal? It appears that the question was answered months ago.


The question of how to “Use a custom snippet over a builtin one?” from the title and it would have been nice if you linked to this answer:

Also since this is a duplicated thread, it should have been marked as such and closed, to avoid confusion and to get people the solutions they were looking for.


Fixed your link for you. I hope you don’t mind.

Additionally, there is good documentation of how to do this now in the Atom book: