Moving from Atom to VSCode. Atom 2 files were created: snippets.json and preferences.json , which worked properly in Atom, but do not work in VSCode (the paths to the folders are the same)

VSCode user options

{ "emmet.extensionsPath": "~/emmet/vscode/" } 

Wail preferences.json

 { "filter.commentAfter": "<!-- /<%= attr('id', '#') %><%= attr('class', '.') %> -->" } 

Snippets.json file

 { "html": { "filters": "html, c", "abbreviations": { "glyph": "span[class=\"glyphicon glyphicon-search\" aria-hidden=\"true\"]", "jq": "script[src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js\"]", "bcmb" : "ol.breadcrumb>li*3>a[href=\"#\"]{ $ }" } } } 


In the file I tried to write like this:

preferences.json

 { "emmet.preferences": { "filter.commentAfter": "<!-- /<%= attr('id', '#') %><%= attr('class', '.') %> -->" } } 

snippets.json

 { "emmet.syntaxProfiles": { "html": { "filters": "html, c", "abbreviations": { "glyph": "span[class=\"glyphicon glyphicon-search\" aria-hidden=\"true\"]", "jq": "script[src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js\"]", "bcmb" : "ol.breadcrumb>li*3>a[href=\"#\"]{ $ }" } } } } 

but nothing helps. What else can you do?

    1 answer 1

    Emmet in vscode works a bit with bugs. It was possible to solve the problem in the following way:

    User settings file (User settings) looks like this:

     { "emmet.extensionsPath": "~/emmet/vscode/", "emmet.triggerExpansionOnTab": true, "emmet.preferences": { "filter.commentAfter": "<!-- /[#ID][.CLASS] -->" }, "emmet.syntaxProfiles": { "html": { "filters": "html, c" } } } 


    The snippets.json file (the path takes from emmet.extensionsPath):

     { "html": { "snippets": { "glyph": "span[class=\"glyphicon glyphicon-search\" aria-hidden=\"true\"]", "jq": "script[src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js\"]", "bcmb" : "ol.breadcrumb>li*3>a[href=\"#\"]{ $ }" } } } 

    Compared to the atom, the abbreviations parameter has changed to snippets