You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug in cursor location within user snippets #11742
Richard Ruiter (@richardruiter) I tried in OS X El Capitan 10.11.6 and Windows 10 with VS Code 1.5.1 and can't repro this. The cursor ends up in the right place.
Are you able to see this when extensions are disabled? Try running code --disable-extensions
Johannes Rieken (@jrieken) Assigning to you since you were the last person touching the snippets side of things as far as I know
Hello, I am still having the issue same with #11782, cursor is not between quotes after autocomplete on HTML. I just updated to VS Code version 1.5.1, and using Windows 7. I am new here so if you need additional information from me, please advice.
Sorry yeah the issue with snippets only working once. It's a strange one and I just haven't had time to dig into it. Basically I'll be able to write 'log[tab]' and have it expand to console.log(...) just fine but only one time, until I restart vscode.
This used to be an issue on osx, primarily with HTML files, this occurred right after a certain release of vscode, I think 1.7.0, but an update to 1.7.1 fixed it, I'm guessing Windows didn't get the same fix
I have the same problem too, snippets only work for $1 and the it skip all next to the end of the snippet, if you've set $0, it will be $1 -> $0, all others will be skipped too. Both on Windows( my version is enterprise 10) and Ubuntu ( 16.04.2).
Since this issue I've give up snippets for a long time. : (
Activity
ramya-rao-a commentedon Sep 9, 2016
Richard Ruiter (@richardruiter) I tried in OS X El Capitan 10.11.6 and Windows 10 with VS Code 1.5.1 and can't repro this. The cursor ends up in the right place.
Are you able to see this when extensions are disabled? Try running
code --disable-extensionsJohannes Rieken (@jrieken) Assigning to you since you were the last person touching the snippets side of things as far as I know
jrieken commentedon Sep 9, 2016
same here - failing to reproduce. Richard Ruiter (@richardruiter) Please update your steps/sample
ITSecMedia commentedon Sep 9, 2016
This very annoying bug happens on my machine too.
Recognised in markdown snippets.
Windows 10 x64 since Version 1.5.0 up to 1.5.1.
jrieken commentedon Sep 9, 2016
Norman Eckstein (@ITSecMedia) It would help if you include reproducible steps and the snippet you are completing
jrieken commentedon Sep 9, 2016
Just to make sure are talking about the same thing. This is what I see and believe is proper.
Markdown bold snippet

Custom snippet as shown above

ITSecMedia commentedon Sep 9, 2016
Sorry, I expected the bug is obvious.
Just opened VSCode, started new markdown file using this snippet.
The defined tab-stops in the snippets doesn't work anymore. When I have a text like this.
example [example](sc <-shortcode) example example example CURSOR HERE
The cursor is not placed at position $1 inside the placed snippet but rather at the end of line.
jrieken commentedon Sep 9, 2016
Thanks. I can reproduce now
jrieken commentedon Sep 9, 2016
As a workaround you can use tab completion (settings >
"editor.tabCompletion": true) which isn't affected by this.18 remaining items
disable multicursor and tab-stop support as a simple solution to #11742
cauldyclark15 commentedon Sep 12, 2016
Hello, I am still having the issue same with #11782, cursor is not between quotes after autocomplete on HTML. I just updated to VS Code version 1.5.1, and using Windows 7. I am new here so if you need additional information from me, please advice.
jrieken commentedon Sep 12, 2016
JC Castaneda (@cauldyclark15) You need to wait for 1.5.2 or built from source
cauldyclark15 commentedon Sep 12, 2016
Johannes Rieken (@jrieken) Thank you for your response, I understand now.
dburles commentedon Sep 20, 2016
Since this fix for some reason snippets only work once
dburles commentedon Feb 15, 2017
Still seeing the above issue
ramya-rao-a commentedon Feb 16, 2017
David Burles (@dburles) I am able to confirm that the issue described above in #11742 (comment) and #11742 (comment) are working as expected.
Are you referring to these linked issues or your earlier comment of "snippets only work once" ?
dburles commentedon Feb 16, 2017
Sorry yeah the issue with snippets only working once. It's a strange one and I just haven't had time to dig into it. Basically I'll be able to write 'log[tab]' and have it expand to
console.log(...)just fine but only one time, until I restart vscode.ramya-rao-a commentedon Feb 16, 2017
David Burles (@dburles) Can you create a new issue for that since this issue is more about the cursor position after snippet expansion?
dburles commentedon Feb 16, 2017
Sure. Though I do recall that it wasn't a problem until this fix was released so it's possibly related.
ramya-rao-a commentedon Feb 16, 2017
David Burles (@dburles) In that case, do add a note about it in the new issue. Thanks!
unChartedZone commentedon Feb 16, 2017
This used to be an issue on osx, primarily with HTML files, this occurred right after a certain release of vscode, I think 1.7.0, but an update to 1.7.1 fixed it, I'm guessing Windows didn't get the same fix
alanldawkins commentedon Mar 17, 2017
I have the same problem too, snippets only work for $1 and the it skip all next to the end of the snippet, if you've set $0, it will be $1 -> $0, all others will be skipped too. Both on Windows( my version is enterprise 10) and Ubuntu ( 16.04.2).
Since this issue I've give up snippets for a long time. : (