Achilles
Achilles

Reputation: 1734

Custom emmet Lipsum text for Visual Studio Code

Simply put, I need Visual Studio Code's Emmet implementation to generate Farsi text when I use the lorem generator. I have been searching and testing proposed solutions across the web for two days now, with not even a tiny shred of luck on both Visual Studio Code and Sublime-Text.

According to Emmet documentation:

Emmet offers wide range of tweaks you can use to fine-tune your plugin experience. Almost all officially developed editor plugins (except PSPad and browser-based) has extensions support: a special folder where you can put json and js files to extend Emmet. Please refer to README file bundled with your editor’s plugin to find out where Emmet looks for extensions.

Visual Studio Code's documentation indicates there is a settings entry named emmet.extensionsPath to tell the VSCode where to look for emmet extensions, but it doesn't seem to work at all.
I have inserted this into VSCode's settings:

{
  .
  .
  "emmet.extensionsPath": "C:\\Workspace\\EditorExtensions\\emmet",
  .
  .
}

and created a simple snippets.json under C:\Workspace\EditorExtensions\emmet:

{
    "html": {
        "abbreviations": {
            "ol_": "ol>li"
        },
        "snippets": {
            "ran": "{ Wrap plain text in curly braces }"
        }
    }
}

But emmet understands neither ol_ nor ran at all.

Could you please direct me in the right direction?

PS: I have also tried the solution given in this SO post with no luck.
PS2: This behavior I get in VSCode is the same way Sublime Text behaves.
PS3: It is mentioned in VSCode documentation that snippets ending in + like ol+ will not work, but I tried both ol+ and ol_ to find out none of them works!
PS4: I know I can create my own snippet using the editor itself, but that will not generate shorter paragraphs like what lorem10 does.

Upvotes: 0

Views: 936

Answers (1)

rioV8
rioV8

Reputation: 28633

I managed to get the custom Emmet snippets working in Windows.

Change your setting to

"emmet.extensionsPath": "/c:/Workspace/EditorExtensions/emmet"

According to the VSC documentation the "abbreviations" no longer are supported and merged into "snippets"

The custom Lorem with a .js file in the folder is not working for me

Upvotes: 1

Related Questions