How to use count prefix in custom keybindings?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
This might end up being a feature request but atm I just don't know if I'm missing something.
I made the following keybinding for commenting a line:
"vim.normalModeKeyBindings": [
{
"before": ["<leader>", "c", "l"],
"commands": ["editor.action.commentLine"]
}
]
It works for a single line, and I expected eg 3 <leader> c l to comment 3 lines but instead nothing happens. Do I need to capture the count prefix in the keybinding definition? or something else?
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 custom keybinding from the issue in VSCodeVim, comparing a single-line invocation with 3 <leader> c l. Start by tracing how vim.normalModeKeyBindings handles count prefixes; done means determining whether counts are supported for custom commands and documenting or implementing the expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100