Check if a chord is active
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Is your feature request related to a problem? Please describe.
When creating mappings in keybindings.json, it's possible to create a collision with a Vim chord.
So for example, you have a shift+k in your keybindings.json and [ "ctrl+w", "K" ] (or [ "ctrl+w", "shift+k" ], it doesn't matter) in your vim.normalModeKeyBindings. shift+k will take priority here, making [ "ctrl+w", "K" ] impossible to trigger.
Describe the solution you'd like
A way to detect if there's a currently active chord. The condition can then be put into when, to ensure that it doesn't shadow the chord.
Describe alternatives you've considered
You can map the keybind in your vim.normalModeKeyBindings, but some commands don't behave properly as a Vim binding for some reason. For example, editor.action.showHover (gh) doesn't behave properly when mapped as a Vim binding: https://github.com/VSCodeVim/Vim/issues/3740#issuecomment-1902688140
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 by tracing how VS Code evaluates keybindings from keybindings.json and how VSCodeVim handles vim.normalModeKeyBindings and chords. Compare the requested when condition with the existing keybinding behavior, including editor.action.showHover; done means a currently active chord can be detected without being shadowed by another binding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100