VSCodeVim / VSCodeVim/Vim

<space> not working as leader key - the key combination (Space, -) is not a command

Open
#8,366 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
When setting <space> (or " ") as a leader key, it does not work.
It works if I use another key (i.e. m) as a leader key.
The message I get is "the key combination (Space, D) is not a command"

To Reproduce
I disabled all the extensions apart from the VSCode Vim extension.
The minimal settings.json is the following

{
  "vim.leader": " ",
  "vim.normalModeKeyBindings": [
    {
      "before": ["<leader>", "d"],
      "commands": ["editor.action.deleteLines"]
    },
  ]
}

Expected behavior
The action is sent (with the minimal config posted above, a line is deleted)

Environment:

  • Extension (VsCodeVim) version:
    1.25.2

  • VSCode version:
    Version: 1.77.1
    Commit: b7886d7461186a5eac768481578c1d7ca80e2d21
    Date: 2023-04-04T23:20:37.202Z
    Electron: 19.1.11
    Chromium: 102.0.5005.196
    Node.js: 16.14.2
    V8: 10.2.154.26-electron.0
    OS: Linux x64 6.2.6-76060206-generic
    Sandboxed: No

  • OS:

➜ cat /etc/os-release                           
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

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

Start by reproducing the issue with the minimal settings.json configuration in the VSCode Vim extension, comparing the space leader with a working letter leader. Trace the handling of the key sequence and verify the configured editor.action.deleteLines command. Done means the space-plus-d keybinding executes the action without the "is not a command" message.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.