Set a keybinding if a key isn't in the Vim pending command keys
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Hello,
I use the following keybindings to switch from one tab to another. I would like to add a condition on them when a key has been pressed (i.e. is in the Vim pending command keys). To be more specific, I mean if the ``rkey has been pressed I cannot at the moment change this current character toH` or `L`.
Do you have any idea how to do this?
{
"key": "ctrl+h",
"command": "workbench.action.navigateLeft",
"when": "editorTextFocus && vim.mode == 'Normal'"
},
{
"key": "ctrl+l",
"command": "workbench.action.navigateRight",
"when": "editorTextFocus && vim.mode == 'Normal'"
},
Thanks
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
The issue names VS Code keybindings, the navigateLeft and navigateRight commands, and Vim pending command keys, but no repository file or test. Start by locating the keybinding context handling for vim.mode == 'Normal' and determine how pending keys are exposed. Done means users can conditionally switch tabs when the pressed key is not pending, with coverage for the requested behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100