VSCodeVim / VSCodeVim/Vim

Remapping replace (`r` key normally in vim) doesn't work

Open
#3,100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/remap
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

I have the following setting:
{ "before": ["y"], "after": ["r"] }, { "before": ["Y"], "after": ["R"] }, { "before": ["r"], "after": ["i"] }, { "before": ["R"], "after": ["I"] },

inside of vim.normalModeKeyBindingsNonRecursive

Pressing 'y' in normal mode doesn't replace the key highlighted, instead it does absolutely nothing!
If I remove { "before": ["r"], "after": ["i"] }, setting, the 'r' key works how I would want my 'y' key to behave.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in VS Code using the shown vim.normalModeKeyBindingsNonRecursive mappings, then trace the key-remapping entry point that handles y and r in normal mode. Done means y performs the replace action normally associated with r even when r is remapped to i, while the existing y/Y mappings continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.