Insert code snippet from file (and automatically fold regions).
Usage
Specify an absolute path to your snippet folder by setting compro-snippet-from-file.snippetDirectory
Reopen VSCode
Open command palette, type compro-snippet-from-file and select below:
compro-snippet-from-file: Insert snippet: Just insert snippet from file
compro-snippet-from-file: Insert snippet and fold all regions: Insert snippet and fold regions
Choose your snippet by typing the path of your snippet
Done!
Extension Settings
Configure extensinon settings by editing settings.json.
compro-snippet-from-file.snippetDirectory: An absolute path to your snippet directory.
Optional Settings
compro-snippet-from-file.snippetExtensions: Specify extensions of your snippet files.
compro-snippet-from-file.addRegion: Whether to add the region delimiter before/after the snippet or not.
compro-snippet-from-file.beginRegion: The region delimiter for each language extension before your snippet (string <SNIPPETPATH> will be replaced to the path of your snippet).
compro-snippet-from-file.endregion: The region delimiter for each language extension after your snippet (string <SNIPPETPATH> will be replaced to the path of your snippet).
compro-snippet-from-file.addRegionExcept: Specify the snippet (by its relative path) that you don't want to add the region delimiter.
compro-snippet-from-file.ignoringDirectory: Ignore files under those directories.