Failed to enter insert-mode if a snippet starts with a linked placeholder.
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
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:
- The snippet must start with a placeholder.
"blah blah ${1:some_placeholder} $1"works fine. - The placeholder must be linked.
"${1:some_placeholder} blah blah"works fine. - 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the supplied snippet in VSCodeVim and trace the snippet-expansion path into the insert/visual-mode transition. Done means a snippet beginning with a linked placeholder enters insert mode rather than visual mode, while the contrasting examples in the report continue to behave as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100