Skip to content

Unexpectedly entered visual mode in snippet #7068

@KenMSK

Description

@KenMSK

Describe the bug
With a custom snippet, vscode enters visual mode when [tab] is pressed (to use the snippet)
This blocks further editing until [esc] and [i] is pressed to enter insert mode again.

To Reproduce

  1. Add the following custom snippet:
    ( How to use snippets: https://code.visualstudio.com/docs/editor/userdefinedsnippets )
{ // file: Buggy_Snippet.code-snippets
  "Snippet Test": {
    "prefix": "SnippetTest",
    "body": ["${1:default}", "${1}"],
    "description": "Snippet that triggers visual mode"
  },
}
  1. In vscode editor, open a file and type "snippettest" and wait/trigger suggestions. Select the appeared snippet and press [tab]/[enter] to use the snippet.
  2. Visual mode is triggered.

Expected behavior
Vscode should stay in insert mode.

Screenshots
image

Environment:

  • Extension (VsCodeVim) version: 1.21.7
  • VSCode version: 1.60.0
  • OS: macOS Big Sur version 11.1

About VSCode:
Version: 1.60.0
Commit: e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff
Date: 2021-09-01T10:54:53.442Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 20.2.0

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