Answer the question
In order to leave comments, you need to log in
How to write a script (snippet) for vscode?
Is it possible to make such a script in vscode (snippet or macro, it doesn't matter), so that on pressing the keys, where the cursor is located, insert text containing the parameters of the current function?
Let's say there is a trace. function:
function main(name, age)
{
| //тут курсор
}
Answer the question
In order to leave comments, you need to log in
This is easily done using the standard snippet system.
Briefly:
1. press F1
2. start typing 'snippets'
3. Select 'Configure User Snippets' from the options
4. Select a file with snippets or create a new one
5. Add a new snippet, following the example in the opened file
Profit!!
For details, see here: https://code.visualstudio.com/docs/editor/userdefi...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question