Home Download Buy Blog Forum Support

Emmet: interference from snippets.json

Emmet: interference from snippets.json

Postby skiwest on Mon Jun 23, 2014 7:39 pm

I am trying to set up a snippets.json file with custom codes to supplement the stock syntax, and it works, but it interferes with other Emmet syntax:
1) I made new file: snippets.json
2) Folder location: C:\Sublime Text\Data\Packages\Emmet\emmet
3) Simplified snippets.json file content: (problem occurs regardless of how many/few lines are used in snippets)
{
"html": {
"filters": "html",
"profile": "html",
"snippets": {
"d_test": "<div>test content</div>"
}
}
}

So, this is successful: when I type "d_test" and press TAB it expands to: <div>test content</div>

The problem is that when the snippets.json file is present, it affects how Emmet expands its regular syntax because the results are bloated with the word "undefined".
ie. when I type "div>div" it expands to:
<div>
undefined<div></div>
</div>

Or when I type "div>ul>li" it expands to:
<div>
undefined<ul>
undefinedundefined<li></li>
undefined</ul>
</div>

Is there a way to supplement Emmet with a snippets.json file without affecting the way it expands stock syntax?
I am running Windows XP
skiwest
 
Posts: 2
Joined: Mon Jun 23, 2014 7:10 pm

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 25 guests