Tabbing through snippet placeholders is circular, the cycle breaks on ENTER or ESC. Need better user experience
- VSCode Version: 1.0.0-stable
- OS Version: 10.11.4
Steps to Reproduce:
- Open VS Code using
--disable-extensionsflag Cmd-Nto open an empty fileCmd-K Mto chooseLanguage ModetoHTML- Enter
!orhtml:5and hitTABto expand - Use
TABto jump to inside thebodytag - Enter any legal emmet syntax like
.container>.rowand hitTAB
Here is an animated GIF:

What I expect to happen:
As the last step above has been executed, normally the emmet in other editors should perform its expand action and the result is:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div class="conainer">
<div class="row"></div>
</div>
</body>
</html>
However, VS Code does not do that, just jumping back to inside the title tag.
You need to press [ENTER] when focus is on
.
@traktraktrugui This experience is not very good.We should add an option to disable looping focus
If it helps with debugging, pressing [Esc] after the first expansion, means that the next expansion will work.
This is totally unexpected behavior:( While @mrmlnc don't ask me to press Enter or Esc I can't write my emmet expressions.
This is due to the way we treat snippets with placeholders. Tabs always circle among the placeholders. Hitting ENTER or ESC breaks the cycle.
@jrieken You have any thoughts here on how we could make the experience better?
Yeah, that how snippets are currently implemented. I personally also like the tab-tab-done mode better. I am planning a bigger redo of the snippet controller in Spring and could tackle this than
This got implemented via https://github.com/Microsoft/vscode/pull/26042. Snippet insertion now follows the tab-tab-done model, meaning snippet mode exits as soon as the the final tab stop is reached. Also Enter doesn't exit snippet anymore by default.