M
M
med1um2019-11-01 19:06:31
Visual Studio Code
med1um, 2019-11-01 19:06:31

How to create your own snippet in VSCode without moving the cursor to the end of the snippet?

After I created my snippet (in javascript.json), it expands in the code, and the first time I press TAB, the cursor gets where it needs to be, but after that, when I press TAB already to enter a tab character, the cursor for some reason moves to the end of the snippet .. Is
there any way to undo this move of the TAB cursor to the end of the snippet?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
med1um, 2019-11-01
@med1um

In the snippet, you need to put $0 instead of the number of the last cursor position (for example, instead of $3)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question