You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am able to invoke editor.action.insertSnippet programmatically; however, I would like to not require the user to select a snippet. Instead, I want to add a button that will invoke a predefined snippet on behalf of the user. Something along the lines of editor.action.insertSelectedSnippet.
The text was updated successfully, but these errors were encountered:
The insertSnippet-command accepts an argument which is either the name of a snippet or a snippet itself. So, either { snippet: "console.log($1)$0"} for an inline snippet or { langId: "csharp", name: "myFavSnippet" } referencing an existing snippet.
@jrieken Having had a few moments to review the docs (insertSnippet, SnippetString and full snippet syntax), I am not seeing this referenced (at least not as clearly as you did in reply). Would it be possible to update the documentation to be more explicit about this?
See this Stack Overflow question for more details.
I am able to invoke
editor.action.insertSnippet
programmatically; however, I would like to not require the user to select a snippet. Instead, I want to add a button that will invoke a predefined snippet on behalf of the user. Something along the lines ofeditor.action.insertSelectedSnippet
.The text was updated successfully, but these errors were encountered: