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

Time:09-27

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?

CodePudding user response:

Add the field $0 in the snippet

"body" : "<p>$0</p>"
  • Related