Chorded `insertModeKeyBindings` does not properly update selection location for non-primary selection
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
BUG REPORT
VSCodeVim Version: 0.12.0
VSCode Version: 1.24.1
Operating system: all
Let's say I have this config:
"vim.insertModeKeyBindings": [
{
"before": ["j","k"],
"after": [ "<esc>" ]
},
]
If I have multiple cursors and type jk in insert mode, only the first selection removes the j.
ab|
ab|
ab|
pressing jk leads to
a[]b
ab[]
ab[]
As an aside, is it possible to change the behavior of insertModeKeyBindings so that j is not inserted and then removed in the text document? This seems to mess up vscode dirty-buffer logic, and also causes bad file contents to be sent to language servers.
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
Start at the insertModeKeyBindings handling for chorded mappings and reproduce the supplied multi-cursor example in VS Code. Trace how the escape action updates each selection, then verify that every non-primary selection removes the temporary input and lands at the expected location; also investigate the reported dirty-buffer and language-server effects.
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