D
D
Daniil Shevkunov2021-12-03 12:29:07
Visual Studio Code
Daniil Shevkunov, 2021-12-03 12:29:07

How to create a snippet in vscode, in which a part will be deleted if it is not filled out?

Usually the snippet has a body like this:
"print(${1:\"${2:text}\"})"

But how can I make sure that when I press Tab without entering text, the part inside the brackets is removed?
That is, if you leave text as text without entering anything, when you press Tab, both it and the quotes around it
(or at least only it) are deleted

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question