VSCodeVim / VSCodeVim/Vim

First keypress of `<C-f>` map key in insertMode not triggered

Open
#2,973 1 comment 1 reaction 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

Describe the bug
InsertMode key mapping for is something wrong!
The first time to press <C-f> did not trigger map keys!

To Reproduce
Steps to reproduce the behavior:

  1. change user setting for the plugin as
"vim.leader": ",",
  "vim.useCtrlKeys": true,
  "vim.insertModeKeyBindings": [
      {
          "before": ["<C-f>"],
          "after": ["<right>"]
      }
  ],
  "vim.handleKeys": {
      // "<C-f>": false
  },
  "vim.normalModeKeyBindings": [
      {
          "before": ["<leader>", "w"],
          "commands": [":w"]
      },
      {
          "before": ["<leader>", "f", "l"],
          "commands": ["workbench.action.toggleSidebarVisibility"]
      },
      {
          // "before": ["<leader>", "<leader>", "f"],
          "before": ["<leader>", "<C-f>"],
          "commands": ["editor.action.formatDocument"]
      }
  ]
  1. toggle the develop tools
  2. open a file with somthing, and press i to change to inserMode
  3. press <C-f>
  4. press <C-f> again.

Expected behavior
every time pressed <C-f> in insetMode, develop tools debug logs should trigger <right> key.

Screenshots
the first time press <C-f>, it would not trigger <right> key, like this:
image
over press more than the sceond time for <c-f>, it work!
image

Environment (please complete the following information):

  • Extension (VsCodeVim) version:
  • VSCode version: 1.26.1
  • OS: maxOS 10.13.6

Additional context
Nothing!

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 with the provided VSCodeVim settings, especially the insertMode mapping from to , and inspect the insert-mode key-mapping handling. Done means the first and every subsequent press triggers the mapped key, with the behavior verified in the VS Code developer tools logs.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.