Theia: Code snippets/template as in Eclipse

Created on 30 Nov 2018  路  2Comments  路  Source: eclipse-theia/theia

It would be awesome to be able to create own code snippets/templates as in Eclipse, i.e. I type "fore" and then via autocomplete create a full foreach loop code fragment that lets me edit only the variable parts.
Not sure if this has been already resolved by #54

enhancement help wanted monaco vscode

Most helpful comment

See https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets

Theia is capable already to load snippets from a file: https://github.com/eclipse-theia/theia/blob/fbfc875593fc31118d906b4bf666afa3141224af/packages/monaco/src/browser/monaco-snippet-suggest-provider.ts#L118

We need a command to allow a user to add new snippets in the global snippet file and code tracking changes to this file and updating snippet configurations.

All 2 comments

See https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets

Theia is capable already to load snippets from a file: https://github.com/eclipse-theia/theia/blob/fbfc875593fc31118d906b4bf666afa3141224af/packages/monaco/src/browser/monaco-snippet-suggest-provider.ts#L118

We need a command to allow a user to add new snippets in the global snippet file and code tracking changes to this file and updating snippet configurations.

PRs are welcomed if someone wants to have a look into it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aaronbartell picture aaronbartell  路  39Comments

jopit picture jopit  路  45Comments

akosyakov picture akosyakov  路  28Comments

kharazit picture kharazit  路  24Comments

boomanaiden154 picture boomanaiden154  路  27Comments