Skip to content

Failed to enter insert-mode if a snippet starts with a linked placeholder. #5969

@fingershi

Description

@fingershi

To Reproduce

See this simple snippet:

	"test": {
		"prefix": "test",
		"body": [
			"${1:some_placeholder}, $1" 
		],
	},

After typing "test" and expanded, vim enters visual mode instead of insert mode.

The bug occurs only if all 3 conditions below are met:

  1. The snippet must start with a placeholder. "blah blah ${1:some_placeholder} $1" works fine.
  2. The placeholder must be linked. "${1:some_placeholder} blah blah" works fine.
  3. It should be a placeholder, not a simple tabstop. "$1 blah blah $1" works fine.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.18.5
  • VSCode version: 1.52.1
  • OS: win10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions