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

akosyakov picture akosyakov  路  3Comments

Beetix picture Beetix  路  3Comments

tetchel picture tetchel  路  3Comments

vince-fugnitto picture vince-fugnitto  路  3Comments

cekvenich picture cekvenich  路  3Comments