VSCodeVim / VSCodeVim/Vim

Space chords not working at all

Open
#2,840 5 comments 5 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

Describe the bug
I normally use <space>f, <space>e, <space>g, etc. for a lot of my Vim keystrokes. I can not seem to get them to work in VSCodeVim though. I'm on Windows 10 and I used to use GVim

To Reproduce
In my settings.json:

{
    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": ["<space>","f"],
            "commands": ["workbench.action.files.save"]
        },
}

Does nothing :( I've tried as many variations as I can think

Near workaround but that isn't enough
Previously, with a similar problem trying to bind <S-space>, I found a workaround by putting the following in keybindings.json (and skipping VSCodeVim's settings.json altogether)

[
    {
        "key": "shift+space",
        "command": "extension.vim_escape",
        "when": "editorTextFocus"
     },
]

I thought maybe I'd give up on settings.json altogether and just only use VSCode commands in the keybindings.json:

    {
        "key": "space f",
        "command": "workbench.action.files.save",
        "when": "editorTextFocus"
     },

Works like a charm. Actually see's my <space>f and does something :|
Except, I realized to my horror, doesn't care what Vim mode he's in. So I can't type anything with a space followed by an f while in insert mode. RIP

Environment (please complete the following information):

Extension Author (truncated) Version
elixir-ls Jak 0.2.21
vim vsc 0.15.0
CPUs Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4 x 2904)
GPU Status 2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: disabled_softwarevideo_decode: enabledvideo_encode: enabledvpx_decode: enabledwebgl: enabledwebgl2: enabled
Memory (System) 31.89GB (24.54GB free)
Process Argv C:\Program Files\Microsoft VS Code\Code.exe D:\Eric\Backup\ProgProjs\ElixirProjects\2018-07-13_BowlingWilliam\README.md
Screen Reader no
VM 0%

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 reported normalModeKeyBindingsNonRecursive configuration from settings.json and compare it with the working keybinding in keybindings.json. Trace how space chords are handled across Vim modes; done means f triggers the command in normal mode while remaining usable as text in insert mode, including on Windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.