Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set the cursor selection for snippet in vscode?

I work in vscode and I recently got to know about snippets. I use a snippet generator website for doing that. But the problem I am facing is after inserting snippet in the code the cursor actually is set at the last of the snippet. But I want like it should keep the cursor in a certain position or select the variables which should be changed in the snippet. Is it possible? If yes, can I know how to do that?

like image 259
Ruthvik Avatar asked Oct 17 '25 10:10

Ruthvik


1 Answers

Add the field $0 in the snippet

"body" : "<p>$0</p>"
like image 164
rioV8 Avatar answered Oct 20 '25 16:10

rioV8