Skip to content

Moving the cursor should not cancel tab stops in a snippet #32790

@niekvandepas

Description

@niekvandepas
  • VSCode Version: Code 1.15.1 (41abd21, 2017-08-16T18:05:38.342Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:
Extension Author (truncated) Version
solargraph cas 0.7.0
cpptools ms- 0.12.3
Ruby reb 0.14.0

Steps to Reproduce:

  1. Open a .html file.
  2. Type a and press tab. The cursor should now be between the double quotes after href.
  3. Move the cursor.
  4. Press tab again.
  5. Verify that rather than jumping to the next tab stop, pressing tab has inserted a tab whitespace character.

The same issue occurs using the following user-defined snippet rather than the emmet abbreviation:

"link": {
    "prefix": "a",
    "body": "<a href=\"$1\">$2</a>" 
},

I'm assuming that this is not intended behavior, but if it is, I feel like there should be a setting to disable it. Moving the cursor to copy-paste text into snippet tab stops is an important part of some of my workflows, and I don't think I'm alone in that (this used to work in previous versions; I am not 100% sure in which version this issue first emerged).

Reproduces without extensions: Yes

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions