This plugin enables you to use your Sublime Text Snippets directly as IntelliJ Live Templates.
In your IDE:
- Open Settings > Plugins > Browse Plugins and then type Sublime Snippets Support in the search box. You should be able to find this plugin as you typing.
- Install it and restart your IDE, then the snippets under your Sublime Text Packages folder will be ready to use.
You can config the directory containing your snippets in Settings > Editor > Live Templates > Sublime Snippets.
When your IDE starts up, this plugin will scan the snippets directory, which if not specified, is your Sublime Text Packages folder. All the snippets found will be converted to live templates in the following manner:
- tabTrigger will be used as template abbreviation. Snippets without a tabTrigger will be omitted.
- scope will be mapped to the corresponding contexts supported by your IDE. Snippets without any supported scope will be omitted.
- Fields and Mirrored Fields are supported.
- Placeholders are supported, however, fields and mirrored fields inside placeholders are not supported.
- Substitutions are not supported. They will be treated as Mirrored Fields instead.
While you can find the auto-generated live templates grouped as "SublimeSnippets" in Settings > Editor > Live Templates, it is recommended NOT to update them because they will be recreated every time you start your IDE. If you do wish to change them, edit the original sublime snippets instead.
- Gradle is used to manage this project, please refer to the official guide if you have any questions.
- While ANTLR is used to parse the snippet content, the Gradle ANTLR plugin is not adopted in this project due to a known issue. Instead, I prefer to generate the lexer/parser source files with ANTLR v4 grammar plugin.