Skip to content

Must tab through deleted tab stops in snippets #31619

Closed
@lamebear

Description

@lamebear
  • VSCode Version: 1.14.2
  • OS Version: OSX 10.12.5

Using the following PHP snippet:

"function …": {
	"prefix": "fun",
	"body": [
		"${1:public }function ${2:FunctionName}(${3:${4:${5:Type} }$${6:var}${7: = ${8:null}}})",
		"{",
		"\t${0:# code...}",
		"}"
	],
	"description": "Function"
},

Which generates:

public function FunctionName(Type $var = null)
{
    # code...
}

If I don't want any function arguements and I delete the code inbetween ( and ) that is generated from the snippet, I have to press tab 6 times after entering tabstop 3 to get to tabstop 0.

It would be ideal if the snippet controller and session were able to understand that tab stop 3 was deleted so the nested tab stops would then be ignored.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugsnippetsverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions