Cannot rebind alternate key to run leader key's original function
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
- Click thumbs-up 👍 on this issue if you want it!
- Click confused 😕 on this issue if not having it makes VSCodeVim unusable.
The VSCodeVim team prioritizes issues based on reaction count.
Is this a BUG REPORT or FEATURE REQUEST? (choose one): Bug Report
Environment:
- VSCode Version: 1.16.1
- VsCodeVim Version: 0.10.1
- OS: Arch Linux, 4.12.13-1-ARCH
What happened:
These are the relevant key bindings/settings I have defined:
"vim.insertModeKeyBindings": [
{
"before": ["t", "n"],
"after": ["<Esc>"]
}
],
"vim.otherModesKeyBindingsNonRecursive": [
{
"before": ["m"],
"after": ["n"]
}
],
"vim.easymotion": true,
"vim.leader": "n",
In a file I search for text by typing /text<Enter> and then press m and nothing happens. When I remove the "vim.leader": "n", line from my settings, this text searching works correctly.
What did you expect to happen:
I want my leader key to be n, and my "find next occurrence of search term" (normally this is n) to be m.
How to reproduce it:
See above.
Other:
There is always a chance this is already possible and I missed something with my config. It makes sense to me why this bug is occurring, although there are some strange interactions. When I press n in normal mode, I see <leader> in the VSCode footer, indicating that I pressed the leader key. When I press m in normal mode, I do not see this visual indicator. However, there are some strange inconsistencies here:
| Combination | Easymotion? |
|---|---|
nnb |
✔️ |
nmb |
|
mnb |
✔️ |
mmb |
So m is not really bound to the leader key (but it sort of is) but it is certainly not bound to the original function of n, which is what I want.
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 reproducing the reported settings and key sequence in VSCodeVim, including the interactions between the leader key, the remapped m key, and Easymotion. Done means n remains usable as the configured leader while m invokes n's original search-next behavior after a search.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100