0

Has anyone gotten the Emmet plugin to work with Soy Templates in Sublime Text 2? I tried following the recommendation here: http://docs.emmet.io/customization/syntax-profiles/ and added a syntaxProfiles.json file with the following:

{ "SoyTemplate": "html" }

but that didn't do anything.

Any advice would be tremendously appreciated. Thank you.

user2360062
  • 663
  • 2
  • 7
  • 19

1 Answers1

0

You can’t just write { "SoyTemplate": "html" } and hope that Emmet will automagically know that you’re currently working with Soy Templates and it should just give you desired output.

In most cases, you can simply use Ctrl+E shortcut in all unknown (to Emmet) syntaxes to get HTML content.

To make it work with Tab key in Sublime Text, you have to do some rather complex things:

  1. First, you have to tweak syntax scopes in tab triggers and supply them with Soy Template scopes. To get current scope name in editor’s status bar, press Ctrl+Shift+P (OSX) or Ctrl+Alt+Shift+P (Windows).

  2. Then you need to somehow modify pyGetSyntax() method and make sure it returns SoyTemplate name for your Soy Template syntax scope. The best way to do so is to override this method in JS extension.

Sergey Chikuyonok
  • 2,626
  • 14
  • 13